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_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}

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&&id.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}
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&&id.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 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&&id.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}
function MM_showHideLayers() { //v6.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
    obj.visibility=v; }
}
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 mmLoadMenus() {
  if (window.mm_menu_0318222418_0) return;
    window.mm_menu_0318222418_0 = new Menu("root",123,16,"Verdana, Arial, Helvetica, sans-serif",10,"#FFFFFF","#FFFFFF","#242021","#5D6374","left","middle",3,0,1000,-5,7,true,true,true,0,true,true);
  mm_menu_0318222418_0.addMenuItem("Modify Details","location='/members/ManageAccount.asp'");
  mm_menu_0318222418_0.addMenuItem("My Ratings","location='/members/MyRatings.asp'");
  mm_menu_0318222418_0.addMenuItem("Manage Movies","location='/members/MyVideos.asp'");
  mm_menu_0318222418_0.addMenuItem("My Subscription","location='/members/ManageSubscription.asp'");
  mm_menu_0318222418_0.addMenuItem("Recently Viewed","location='/members/RecentlyViewed.asp'");
   mm_menu_0318222418_0.fontWeight="bold";
   mm_menu_0318222418_0.hideOnMouseOut=true;
   mm_menu_0318222418_0.bgColor='#242021';
   mm_menu_0318222418_0.menuBorder=1;
   mm_menu_0318222418_0.menuLiteBgColor='#5D6374';
   mm_menu_0318222418_0.menuBorderBgColor='#5D6374';

mm_menu_0318222418_0.writeMenus();
} // mmLoadMenus()
function PageRecords(url,rid) {
  window.location.href = url+rid;
}

function StoreForm(){
 if(document.frmStore.keywords.value==""){
 alert("Enter keywords");
 document.frmStore.keywords.focus();
 return false;
 } 
}

function SearchForm(){
 if(document.frmSearch.name.value==""){
 alert("Enter name");
 document.frmSearch.name.focus();
 return false;
 } 
}

function handbag(){
 if(document.frmbag.c_fname.value==""){
 alert("Enter First name");
 document.frmbag.c_fname.focus();
 return false;
 } 
 if(document.frmbag.c_lname.value==""){
 alert("Enter Last name");
 document.frmbag.c_lname.focus();
 return false;
 } 
 strEmail = document.frmbag.c_email.value;
 if (strEmail.search(/^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/) == -1)
 {
 alert("Enter valid Email address\neg:user@domain.com");
 document.frmbag.c_email.focus();
 return false;
 }
 if(document.frmbag.c_mob.value==""){
 alert("Enter Mobile");
 document.frmbag.c_mob.focus();
 return false;
 }
}

function Registerform(){
 if(document.frmregister.c_fname.value==""){
 alert("Enter First Name");
 document.frmregister.c_fname.focus();
 return false;
 }
 if(document.frmregister.c_lname.value==""){
 alert("Enter Last name");
 document.frmregister.c_lname.focus();
 return false;
 }
 strEmail = document.frmregister.c_email.value;
 if (strEmail.search(/^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/) == -1)
 {
 alert("Enter valid Email address\neg:user@domain.com");
 document.frmregister.c_email.focus();
 return false;
 }
 if(document.frmregister.c_profession.value==""){
 alert("Select Profession");
 document.frmregister.c_profession.focus();
 return false;
 }
 if(document.frmregister.c_username.value==""){
 alert("Enter Username!");
 document.frmregister.c_username.focus();
 return false;
 } 
 if(document.frmregister.c_password.value==""){
 alert("Enter Password!");
 document.frmregister.c_password.focus();
 return false;
 } 
 if(document.frmregister.c_passwordc.value==""){
 alert("Confirm Password!");
 document.frmregister.c_passwordc.focus();
 return false;
 } 
 if(document.frmregister.c_password.value!=document.frmregister.c_passwordc.value){
 alert("Password doesnt match!Please re-enter");
 document.frmregister.c_passwordc.value = "";
 document.frmregister.c_password.value = "";
 document.frmregister.c_password.focus();
 return false;
 } 
 if(document.frmregister.c_question.value==""){
 alert("Select Secret Question");
 document.frmregister.c_question.focus();
 return false;
 }
 if(document.frmregister.c_answer.value==""){
 alert("Enter Secret Answer");
 document.frmregister.c_answer.focus();
 return false;
 }
 if(document.frmregister.c_tc.checked == false){
 alert("You must agree to the Terms & Conditions before proceeding");
 return false;
 }
}
function Noticeform(){
 if(document.frmNotice.noticeTitle.value==""){
 alert("Select Notice title");
 document.frmNotice.noticeTitle.focus();
 return false;
 } 
 if(document.frmNotice.noticeCat.value==""){
 alert("Select Notice Category");
 document.frmNotice.noticeCat.focus();
 return false;
 }
 if(document.frmNotice.noticeDesc.value==""){
 alert("Enter Notice Details.");
 document.frmNotice.noticeDesc.focus();
 return false;
 } 
}
function CheckLogin(){
 if(document.frmLogin.muser.value==""){
 alert("Enter Username!");
 document.frmLogin.muser.focus();
 return false;
 } 
 if(document.frmLogin.mpass.value==""){
 alert("Enter Password!");
 document.frmLogin.mpass.focus();
 return false;
 } 
}
function reviews(){
 if(document.frmreview.visitor.value==""){
 alert("Enter your name!");
 document.frmreview.visitor.focus();
 return false;
 } 
 if(document.frmreview.comments.value==""){
 alert("Enter Artist comments!");
 document.frmreview.comments.focus();
 return false;
 } 
}
function checkout(){
 if(document.frmcheckout.smethod.value==""){
 alert("Select Shipping method");
 document.frmcheckout.smethod.focus();
 return false;
 } 
 if(document.frmcheckout.saddress.value==""){
 alert("Enter Shipping Address");
 document.frmcheckout.saddress.focus();
 return false;
 } 
 if(document.frmcheckout.baddress.value==""){
 alert("Enter Billing Address");
 document.frmcheckout.baddress.focus();
 return false;
 } 
 if(document.frmcheckout.pmethod.value==""){
 alert("Select Payment method");
 document.frmcheckout.pmethod.focus();
 return false;
 } 
}

function emailfriend(){
 if(document.frmemail.name.value==""){
 alert("Enter Friends Name");
 document.frmemail.name.focus();
 return false;
 }
 if(document.frmemail.email.value==""){
 alert("Enter Friends Email address!");
 document.frmemail.email.focus();
 return false;
 }
 strEmail = document.frmemail.email.value;
if (strEmail.search(/^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/) == -1)
{
alert("Invalid Email address!");
document.frmcontact.email.focus();
return false;
}
}

function booking1(){
 if(document.frmBooking.cName.value==""){
 alert("Enter Name");
 document.frmBooking.cName.focus();
 return false;
 }
 if(document.frmBooking.cEmail.value==""){
 alert("Enter Email address");
 document.frmBooking.cEmail.focus();
 return false;
 }
 strEmail = document.frmBooking.cEmail.value;
	if (strEmail.search(/^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/) == -1)
	{
	alert("Invalid Email address!\neg:user@domain.com");
	document.frmBooking.cEmail.focus();
	return false;
	}
 if(document.frmBooking.cTel.value==""){
 alert("Enter contact number");
 document.frmBooking.cTel.focus();
 return false;
 }
 if(document.frmBooking.cCity.value==""){
 alert("Enter city");
 document.frmBooking.cCity.focus();
 return false;
 }
}

function mbid(){
 if(document.frmMbid.genre.value==""){
 alert("Select Genre");
 document.frmMbid.genre.focus();
 return false;
 }
 if(document.frmMbid.videoname.value==""){
 alert("Enter Music Video Name");
 document.frmMbid.videoname.focus();
 return false;
 }
 if(document.frmMbid.FILE1.value==""){
 alert("Upload File missing!");
 document.frmMbid.FILE1.focus();
 return false;
 }
}

function genrecheck(genreid)
{
window.location.href="GenreBrowse.asp?genreid="+genreid;
}

function disableSelection(target){
if (typeof target.onselectstart!="undefined") //IE route
	target.onselectstart=function(){return false}
else if (typeof target.style.MozUserSelect!="undefined") //Firefox route
	target.style.MozUserSelect="none"
else //All other route (ie: Opera)
	target.onmousedown=function(){return false}
target.style.cursor = "default"
}

