<!--
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

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_swapImage() { //v3.0

  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}


function confdelete()
{
	var c=window.confirm("This will clear/delete all items & empty your CART. Continue...?");
	//alert(c);
	if(c==true){
	document.frmorder.clear.value="true";
		document.frmorder.submit();
		}
	else
		return false;
}

function check_form2()
{
if ((document.form2.email.value=="") || (document.form2.password.value=="") )
{
alert("Please enter email id & password");
return false;
}
}


function check_search()
{

if ((document.fsearch.keywords.value=="") )
{
alert("Please type keywords");
return false;
}
else
document.fsearch.submit();
}

//category,family,alpha,pset,pageno
function get_code(id,name,a,pset,page)
{
//alert();
document.f2.cat_code.value=id;
document.f2.fam_code.value=name;
document.f2.alpha.value=a;
document.f2.curr_set.value=pset;
document.f2.currentpage.value=page;
document.f2.submit();
}

function open_file(filename)
{
window.open(filename,"newwin","width=650,height=550,left=50,top=50,toolbar=yes,directories=no,scrollbars=yes");
window.close;

}



function open_wind()
{
index=document.f1.fam.selectedIndex;
id=document.f1.fam.options[index].value;
window.open("open_list.ASP?ID="+id,"newwin","width=650,height=450,left=100,top=100,toolbar=no,directories=no,scrollbars=yes");
window.close;
}
function open_wind2(id)
{
window.open("open_list.ASP?ID="+id,"newwin","width=650,height=450,left=100,top=100,toolbar=no,directories=no,scrollbars=yes");
window.close;
}

function open_info(id,album_code)
{
//alert(album_code);
location.href=("show_info.ASP?ID="+id+"&album_code="+album_code);
}

function open_info_album(album_code)
{

location.href=("show_album.ASP?album_code="+album_code);
window.close;

}
function verify_submit()
{

if (document.f1.delivery_cust_address.value =="")
{
alert("Please enter full shipping address in the text area");
return false;
}
}

 
function image_resize() 
{
    W = document.f1.images['album_image'].width ;
     H= document.f1.images['album_image'].height;
    img_ratio=W/H;
     alert(document.images['album_image'].width); 
    alert(img_ratio);    
    //document.images['album_image'].width=parceInt(150*img_ratio);
   // document.images['album_image'].height=150;
    //alert(document.images['album_image'].width);

var img_obj = new Image();
    img_obj =document.album_image.value;
   img_obj.width=parceInt(150*img_ratio);
   alert( img_obj.width);
   img_obj.height=150; 
    document.changing.src = img_obj;
    document.changing.width =img_obj.width;
document.changing.height=150;
    set();

} 
  
    
function submit_form()
{
if (document.form1.username.value =="" )
{
alert("Sorry ! Please login before you click on add to cart");
document.form2.email.focus();
//location.href="login.asp?redirect=cart";
}
else
document.form1.submit();
} 

function submit_artist(artist)
{
document.form1.artist.value=artist;
alert(artist);
document.form1.submit();

}

function submit_artist_fam(artist)
{
document.fam_search.keywords.value=artist;
document.fam_search.submit();

}


function open_player(id,code)
{
window.open("addkiosk_player.asp?ID="+id+"&album_code="+code,"newwin","width=300,height=200,left=400,top=100,toolbar=no,directories=no,scrollbars=no,status=no");

window.close;
}

function send_order()
{
	var c=window.confirm("Would you like to submit this order by email & pay later by cheque?");
	//alert(c);
	if(c==true)
	{
	document.f1.method="post";
	document.f1. action="send_order.asp";
	document.f1.submit();	
	}
		
	else
		return false;
}

function search_ext_results(cset,cpage)
{
document.form1.curr_set.value=cset;
document.form1.currentpage.value=cpage;
document.form1.submit();

}



function expandCollapse(elem, changeImage) {

   if (document.getElementById) {
    ecBlock = document.getElementById(elem);
    if (ecBlock != undefined && ecBlock != null) {
      if (changeImage) {
        //gets the image associated
        elemImage = document.getElementById(elem + "Image");
      }
      //make sure elemImage is good
      if (!changeImage || (elemImage != undefined && elemImage != null)) {
        if (ecBlock.currentStyle.display == "none" || ecBlock.currentStyle.display == null || ecBlock.currentStyle.display == "") {
          //shows the info.
          ecBlock.style.display = "block";
          if (changeImage) {
            //Just got in expanded mode. Thus, change image to "collapse"
            elemImage.src = "images/up.png";
          }
        }
        else if (ecBlock.currentStyle.display == "block") {
          //hide info
          ecBlock.style.display = "none";
          if (changeImage) {
            //Just got in collapsed mode. Thus, change image to "expand"
            elemImage.src = "images/down.png";
          }
        }
        else {
          //catch any weird circumstances.
          ecBlock.style.display = "block";
          if (changeImage) {
            elemImage.src = "images/up.png";
          }
        }
      }
      //end check elemImage
    }
    //end check ecBlock
  }
  //end getElemById

//end expandCollapse function

}


function popup(album_code)
{
location.href="review.asp?album_code="+album_code;
}


function check_amount()
{
if (document.frmorder.frm_tot.value < 50)
{
alert("Minimum order amount is Rs.50 ");
return false;
}
else
document.frmorder.mode.value="Checkout";
document.frmorder.submit();
}

function openfree()
{
location.href="free_download_chk.asp";
}
//-->


