function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
//..................................................................................
function getCookie(name){	// function to grab cookie using name of cookie
  var cname = name + "=";               
  var dc = document.cookie;             
  if (dc.length > 0) {              
    begin = dc.indexOf(cname);       
    if (begin != -1) {           
      begin += cname.length;       
      end = dc.indexOf(";", begin);
      if (end == -1) end = dc.length;
        return unescape(dc.substring(begin, end));
    } 
  }
  return 'null';
}

//............. function to set cookie

function setCookie(name, value, expires, path, domain, secure) { 
  document.cookie = name + "=" + escape(value) + 
  ((expires == null) ? "" : "; expires=" + expires.toGMTString()) +
  ((path == null) ? "" : "; path=" + path) +
  ((domain == null) ? "" : "; domain=" + domain) +
  ((secure == null) ? "" : "; secure");
}
//............. function to delete cookie using name of cookie

function delCookie (name,path,domain) {	
  if (getCookie(name)) {
    document.cookie = name + "=" +
    ((path == null) ? "" : "; path=" + path) +
    ((domain == null) ? "" : "; domain=" + domain) +
    "; expires=Thu, 01-Jan-70 00:00:01 GMT";
  }
}
var req;
var play = [];
var hit=0;
function playSample(id) {
if(hit && hit!=0){
	var h = "<a href='javascript:playSample("+ hit +");'><img src='/view/images/icons/samples.gif' border='0' width='120' height='20' alt='Music sample available for this track' /></a>";
	MM_setTextOfLayer('sample'+hit,'',h)
}

	hit=id
  var info='<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" id="playsample'+id+'" width="120" height="20" align="middle">'
  info+='<param name="allowScriptAccess" value="sameDomain" />'
  info+='<param name="movie" value="view/flash/playsample.swf?id='+id+ '" />'
  info+='<param name="quality" value="high" />'
  info+='<param name="bgcolor" value="#cccccc" />'
  info+='<param name="scale" value="exactfit" />'
   info+='<embed src="view/flash/playsample.swf?id='+id+ ' "quality="high"  scale="exactfit" bgcolor="#cccccc" width="120" height="20"  name="playsample' + id + '" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />'
   info+='</object>'
  if(info){
  	MM_setTextOfLayer('sample'+id,'',info)
	}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_setTextOfLayer(objName,x,newText) { //v4.01
  if ((obj=MM_findObj(objName))!=null) with (obj)
    if (document.layers) {document.write(unescape(newText)); document.close();}
    else innerHTML = unescape(newText);
}

