var xmlHttp5;
var xmlHttp_LYB_Renewal;
var xmlHttp_LYB_Renewal2;

   function changebtn(){
	document.getElementById("imgbtn").src="pix/OKButton.bmp"
	}
   function restorebtn(){
    document.getElementById("imgbtn").src="pix/OKButton2.bmp"
    }
   function onpagesrch(){
     show_lyb_main_page('lyb.php');
    }  
   function onpagesrch2(datapass){
   	window.location.href = "about_us.php?datapass="+datapass;
    }  
   function changebday(str, str2){
   	document.getElementById(str).value="";
	NewCal(str, str2);
	}

function open_giftcatalogue(){
window.open('assets/christmas_catalogue.pdf','_blank')
}	




function open_anniversary2010(){
//window.open('love_etc_popup.php', '_blank','toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=no, copyhistory=no, width=650, height=790');	
shop_promos_tb1_main = "tbl1";	
var url_bathbody="love_etc_popup.php";
datacontent = "originalspromo";
dataforupload(url_bathbody);
document.getElementById('originalspromo').style.display="block"
onappear_LYBbox('0','originalspromo')
}

function show_lyb_main_page(str5)
{ 

window.location.href=str5;
/*
xmlHttp5=GetXmlHttpObject5()
if (xmlHttp5==null)
 {
 alert ("Browser does not support HTTP Request")
 return
 }
var url5=str5
xmlHttp5.onreadystatechange=on_show_lyb_main_page
xmlHttp5.open("GET",url5,true)
xmlHttp5.send(null)
*/
}

function on_show_lyb_main_page() 
{ 
if (xmlHttp5.readyState==4 || xmlHttp5.readyState=="complete")
 { 
 document.getElementById("datafileloader").innerHTML=xmlHttp5.responseText 
 //allfunctions_lyb('usecard')
 onload_lybpromos('lyb_promotions.php')
 } 
}



function showUser5(str5)
{ 
window.location.href=str5
/*
xmlHttp5=GetXmlHttpObject5()
if (xmlHttp5==null)
 {
 alert ("Browser does not support HTTP Request")
 return
 }
var url5=str5
xmlHttp5.onreadystatechange=stateChanged5
xmlHttp5.open("GET",url5,true)
xmlHttp5.send(null)*/
}

function stateChanged5() 
{ 
if (xmlHttp5.readyState==4 || xmlHttp5.readyState=="complete")

 { 
 document.getElementById("datafileloader").innerHTML=xmlHttp5.responseText 
  		var so = new SWFObject("newsite/img/flashcontent/tbs_ecom_hp_02.swf", "navi-top", "920", "485", "8", "#ffffff");
   		so.addParam("quality", "high");
   		so.addParam("align", "middle");
   		so.addParam("scale", "noscale");
   		so.addParam("wmode","opaque"); 
   		so.write("flash-content");
 
 } 
}


function showalternativeUser6(str5,attrib)
{ 
  		var so = new SWFObject("loading_sample2.swf", "navi-top", "900", "500", "8", "#ffffff");
   		so.addParam("quality", "high");
   		so.addParam("align", "middle");
   		so.addParam("scale", "noscale");
  		so.addParam("wmode","opaque"); 
   		so.write("datafileloader");

xmlHttp5=GetXmlHttpObject5()
if (xmlHttp5==null)
 {
 alert ("Browser does not support HTTP Request")
 return
 }
var url5=str5+"?attrib="+attrib
xmlHttp5.onreadystatechange=showalternativeUser6_data
xmlHttp5.open("GET",url5,true)
xmlHttp5.send(null)
}

function showalternativeUser6_data() 
{ 
if (xmlHttp5.readyState==4 || xmlHttp5.readyState=="complete")

 { 
 document.getElementById("datafileloader").innerHTML=xmlHttp5.responseText 
  		var so = new SWFObject("newsite/img/flashcontent/tbs_ecom_hp_02.swf", "navi-top", "920", "485", "8", "#ffffff");
   		so.addParam("quality", "high");
   		so.addParam("align", "middle");
   		so.addParam("scale", "noscale");
   		so.addParam("wmode","opaque"); 
   		so.write("flash-content");
 
 } 
}


function showBodylounge(str5)
{
window.location.href="lounge.php"
}



function loadaniv_raffle(){
xmlHttp5=GetXmlHttpObject5()
if (xmlHttp5==null)
 {
 alert ("Browser does not support HTTP Request")
 return
 }
var url5="anivraffle.php"
xmlHttp5.onreadystatechange=show_anivraffle
xmlHttp5.open("GET",url5,true)
xmlHttp5.send(null)	
}

function show_anivraffle() 
{ 
if (xmlHttp5.readyState==4 || xmlHttp5.readyState=="complete")
 { 
 document.getElementById("shopcontenmainpage").innerHTML=xmlHttp5.responseText 
 } 
}



function GetXmlHttpObject5()
{
var xmlHttp5=null;
try
 {
 // Firefox, Opera 8.0+, Safari
 xmlHttp5=new XMLHttpRequest();
 }
catch (e)
 {
 //Internet Explorer
 try
  {
  xmlHttp5=new ActiveXObject("Msxml2.XMLHTTP");
  }
 catch (e)
  {
  xmlHttp5=new ActiveXObject("Microsoft.XMLHTTP");
  }
 }
return xmlHttp5;
}


function tbsunload(){
xmlHttp5=GetXmlHttpObject5()
if (xmlHttp5==null)
 {
 alert ("Browser does not support HTTP Request")
 return
 }
var url5="session_erase.php";
xmlHttp5.onreadystatechange=stateChanged_sesserase
xmlHttp5.open("GET",url5,true)
xmlHttp5.send(null)
}
function stateChanged_sesserase() 
{ 
if (xmlHttp5.readyState==4 || xmlHttp5.readyState=="complete")
 { 
 
 } 
}

	var witd_var = 0;
	var witd_var2 = 0;	
	
	var left_var = 0;
	var width2_1 = 0;
	function chanewidth_main1_big(width2){
	document.getElementById("div_main1").style.cursor = "pointer";	
	document.getElementById('div_main1').style.width= width2;
	witd_var = parseInt(width2) + 2;
	if(witd_var < 251){
	setTimeout("chanewidth_main1_big('" + witd_var + "px')",10)
	}}
	
	
	function chanewidth_main1_small(width){
	document.getElementById("div_main1").style.cursor = "default";			
	document.getElementById('div_main1').style.width= width
	witd_var = parseInt(width) - 2;
	if(witd_var > 229){
	setTimeout("chanewidth_main1_small('" + witd_var + "px')",10)
	}}
	

	function chanewidth_main2_big(width2){
	document.getElementById("div_main2").style.cursor = "pointer";			
	document.getElementById('div_main2').style.width= width2;
	witd_var = parseInt(width2) + 2;
	if(witd_var < 251){
	setTimeout("chanewidth_main2_big('" + witd_var + "px')",10)
	}}
	
	
	function chanewidth_main2_small(width){
	document.getElementById("div_main2").style.cursor = "default";		
	document.getElementById('div_main2').style.width= width
	witd_var = parseInt(width) - 2;
	if(witd_var > 229){
	setTimeout("chanewidth_main2_small('" + witd_var + "px')",10)
	}}	
	
	function chanewidth_main3_big(width2){
	document.getElementById("div_main3").style.cursor = "pointer";			
	document.getElementById('div_main3').style.width= width2;
	witd_var = parseInt(width2) + 2;
	if(witd_var < 251){
	setTimeout("chanewidth_main3_big('" + witd_var + "px')",10)
	}}
	
	
	function chanewidth_main3_small(width){
	document.getElementById("div_main3").style.cursor = "default";		
	document.getElementById('div_main3').style.width= width
	witd_var = parseInt(width) - 2;
	if(witd_var > 229){
	setTimeout("chanewidth_main3_small('" + witd_var + "px')",10)
	}}	
	

	function chanewidth_main4_big(xpos, ypos){
	document.getElementById("div_main4").style.backgroundPosition = xpos + " " + ypos;			
	witd_var = parseInt(xpos) + 2;
	if(witd_var < 1){
	setTimeout("chanewidth_main4_big('" + witd_var + "px','" + ypos + "')",10)
	}}
	
	
	function chanewidth_main4_small(xpos, ypos){
	document.getElementById("div_main4").style.backgroundPosition = xpos + " " + ypos;		
	witd_var = parseInt(xpos) - 2;
	if(witd_var > -21){
	setTimeout("chanewidth_main4_small('" + witd_var + "px','" + ypos + "')",10)
	}}	
	
	
	function onchangeview(title){
	document.getElementById(title).style.cursor = "pointer";
	
		if(title == "header_home1"){
		document.getElementById(title).style.backgroundImage = "url(pix/btn_home_selected.gif)";	
		}
		else if(title == "header_home2"){
		document.getElementById(title).style.backgroundImage = "url(pix/btn_shop_selected.gif)";	
		}		
		else if(title == "header_home3"){
		document.getElementById(title).style.backgroundImage = "url(pix/btn_values_selected.gif)";	
		}
		else if(title == "header_home4"){
		document.getElementById(title).style.backgroundImage = "url(pix/btn_lounge_selected.gif)";	
		}
		else if(title == "header_home5"){
		document.getElementById(title).style.backgroundImage = "url(pix/btn_loyalty_selected2.GIF)";	
		}		
	}
	
	
	function onchangeview2(title){
	document.getElementById(title).style.cursor = "Default";	
		if(title == "header_home1"){
		document.getElementById(title).style.backgroundImage = "url(pix/btn_home.gif)";	
		}
		else if(title == "header_home2"){
		document.getElementById(title).style.backgroundImage = "url(pix/btn_shop.gif)";	
		}		
		else if(title == "header_home3"){
		document.getElementById(title).style.backgroundImage = "url(pix/btn_values.gif)";	
		}
		else if(title == "header_home4"){
		document.getElementById(title).style.backgroundImage = "url(pix/btn_lounge.gif)";	
		}
		else if(title == "header_home5"){
		document.getElementById(title).style.backgroundImage = "url(pix/btn_loyalty.gif)";	
		}		
	}	

	
	var LYBcarid_new = "";
	var LYBLName_new = "";
	var answerLYB = "";
	var return_cardid = "";
	var accumulatedcost = "";
	function ondata_LYB_renewchk(objname){
	LYBcarid_new = document.getElementById("renew_LYBcard").value;
	LYBLName_new = document.getElementById("renew_LYBmember_LName").value;
	if(LYBcarid_new == ""){
	alert("Enter your LYB card number first before proceeding")	
	document.getElementById("renew_LYBcard").focus();
	return;
	}
	if(LYBLName_new == ""){
	alert("Enter your last name before proceeding")	
	document.getElementById("renew_LYBmember_LName").focus();
	return;
	}	

	xmlHttp_LYB_Renewal=GetXmlHttpObject5()
	if (xmlHttp_LYB_Renewal==null)
	 {
	 alert ("Browser does not support HTTP Request")
	 return
	 }
	 var url_LYB_renew="LYBRenewal_chkr.php?cardid=" + LYBcarid_new + "&LName="+ LYBLName_new+"&objname="+objname;
	xmlHttp_LYB_Renewal.onreadystatechange=checkfor_renewLYB
	xmlHttp_LYB_Renewal.open("GET",url_LYB_renew,true)
	xmlHttp_LYB_Renewal.send(null)
	document.getElementById('lybcontenmanin').style.cursor = "wait"  
	document.getElementById('header_menutabe').style.cursor = "wait"
	}
	
function checkfor_renewLYB() 
{ 
if (xmlHttp_LYB_Renewal.readyState==4 || xmlHttp_LYB_Renewal.readyState=="complete")
 { 
 var xmlDocument=xmlHttp_LYB_Renewal.responseXML; 	
 answerLYB =xmlDocument.getElementsByTagName("answer1")[0].childNodes[0].nodeValue;
 return_cardid = xmlDocument.getElementsByTagName("cardid")[0].childNodes[0].nodeValue;
 accumulatedcost = xmlDocument.getElementsByTagName("accumulatedcost")[0].childNodes[0].nodeValue;
 var objname = xmlDocument.getElementsByTagName("objname")[0].childNodes[0].nodeValue;

 	if(answerLYB == "fail")
	 {
		alert("You've entered an invalid id. try again.")
		document.getElementById('lybcontenmanin').style.cursor = "Default"  
		document.getElementById('header_menutabe').style.cursor = "Default"
	 }
	 else{
	 	
	 	  var accucost = parseInt(accumulatedcost);

          onfading_LYBbox('100',objname)
          
		 xmlHttp_LYB_Renewal2=GetXmlHttpObject5()
		 if(xmlHttp_LYB_Renewal2==null)
		 {
		 alert ("Browser does not support HTTP Request")
	 	return
	 	 }
	 	 var url_LYB_renew2="LYBRRen_maindata.php?cardid="+return_cardid+"&accumulatedcost="+accumulatedcost;
    	 xmlHttp_LYB_Renewal2.onreadystatechange=show_renewLYB
    	 xmlHttp_LYB_Renewal2.open("GET",url_LYB_renew2,true)
    	 xmlHttp_LYB_Renewal2.send(null)
    	}
 } 
}	
	
function show_renewLYB() 
{ 
if (xmlHttp_LYB_Renewal2.readyState==4 || xmlHttp_LYB_Renewal2.readyState=="complete")

 { 
 document.getElementById("lybcontenmanin").innerHTML=xmlHttp_LYB_Renewal2.responseText 
 document.getElementById('lybcontenmanin').style.cursor = "Default"  
 document.getElementById('header_menutabe').style.cursor = "Default" 
 onappear_LYBbox('0','renewlybdata')
 } 
}	
	
	
function onsubmitofrenewal2(cardid, accumulatedcost, update_chk){
var FNAME = document.getElementById("txtFName_Ren").value;
var LNAME = document.getElementById("txtLName_Ren").value;
var MNAME = document.getElementById("txtMName_Ren").value;
var NNAME = document.getElementById("txtNName_Ren").value;  
var CITY = document.getElementById("txtCity_Ren").value;
var BDAY = document.getElementById("txtBday_Ren").value;
var mailaddr = document.getElementById("mailaddr").value;
var cellphone = document.getElementById("txtCellphone_Ren").value;
var offphone = document.getElementById("txtoffphone_Ren").value;
var Email = document.getElementById("txtEmail_Ren").value;
var accucost = parseInt(accumulatedcost);
var storeid = "";


if(LNAME == ""){
alert("Please enter Last name first\nbefore updating your profile")	
document.getElementById("txtLName_Ren").focus();	
return;	
}

if(Email == ""){
alert("Please enter your email address first\nbefore updating your profile")	
document.getElementById("txtEmail_Ren").focus();	
return;
}
if(Email.length < 7 ){
alert("You\'ve entered an ivalid email, please enter it correctly.")	
document.getElementById("txtEmail_Ren").focus();	
return;	
}
if(Email.search(/.com/) == -1 && Email.search(/.net/) == -1 && Email.search(/.gov/) == -1 && Email.search(/.org/) == -1&& Email.search(/.edu/) == -1 ){
alert("You\'ve entered an ivalid email, please enter it correctly.")	
document.getElementById("txtEmail_Ren").focus();	
return;	
}
if(Email.search(/@/) == -1 ){
alert("You\'ve entered an ivalid email, please enter it correctly.")	
document.getElementById("txtEmail_Ren").focus();	
return;	
}


if(accucost >= 14400){
storeid = document.getElementById("sel_renLYBStore").value;	
if(storeid == ""){
alert("Please select a store to which you want to claim your card")	
document.getElementById("sel_renLYBStore").focus();
return;
}

var url_LYB_renew="LYBRenew_updatedinfo.php?FNAME=" + FNAME + "&LNAME="+ LNAME+ "&MNAME="+MNAME+"&NNAME="+NNAME+"&CITY="+CITY+"&BDAY="+BDAY+"&mailaddr="+mailaddr+"&cellphone="+cellphone+"&offphone="+offphone+"&Email="+Email+"&storeid="+storeid+"&cardid="+cardid;
}
else{
var url_LYB_renew="LYBRenew_updatedinfo.php?FNAME=" + FNAME + "&LNAME="+ LNAME+ "&MNAME="+MNAME+"&NNAME="+NNAME+"&CITY="+CITY+"&BDAY="+BDAY+"&mailaddr="+mailaddr+"&cellphone="+cellphone+"&offphone="+offphone+"&Email="+Email+"&storeid="+storeid+"&cardid="+cardid+"&storeid="+storeid;	
}
	xmlHttp_LYB_Renewal=GetXmlHttpObject5()
	xmlHttp5 = GetXmlHttpObject5()
	if (xmlHttp_LYB_Renewal==null)
	 {
	 alert ("Browser does not support HTTP Request")
	 return
	 }

	 xmlHttp_LYB_Renewal.onreadystatechange=update_renewLYB
	 xmlHttp_LYB_Renewal.open("GET",url_LYB_renew,true)
	 xmlHttp_LYB_Renewal.send(null)
	 
	 url_LYB_Emailblaster = "emailblaster.php?cardid=" + cardid + "&Email=" + Email+ "&storeid="+ storeid+"&FNAME="+FNAME+"&LNAME="+LNAME + "&MNAME="+MNAME+"&NNAME="+NNAME+"&CITY="+CITY+"&BDAY="+BDAY+"&mailaddr="+mailaddr+"&cellphone="+cellphone+"&offphone="+offphone;
	 xmlHttp5.open("GET",url_LYB_Emailblaster,true)
	 xmlHttp5.send(null)
}	


function onsubmitofrenewal(cardid, accumulatedcost, update_chk){
accucost = parseInt(accumulatedcost);
if(update_chk == "0"){
	if(accucost >= 14400){
	var answer = confirm("Are you sure you want to update your profile\nand claim your card at the selected store");
		if (answer==false){
  			return;
  		}	
  		else{
		onsubmitofrenewal2(cardid, accumulatedcost, update_chk)	
		}
	}
	else{
	var answer = confirm("Are you sure you want to update your profile");
		if (answer==false){
  			return;
  		}	
  		else{
		onsubmitofrenewal2(cardid, accumulatedcost, update_chk)	
		}		  		
	}
}
else{
	if(accucost >= 14400){
	var answer = confirm("Are you sure you want to update your profile\nbut we cannot changed store you want\n to claim your card.");
		if (answer==false){
  			return;
  		}	
   		else{
		onsubmitofrenewal2(cardid, accumulatedcost, update_chk)	
		}  		
	}
	else{
	var answer = confirm("Are you sure you want to update your profile");
		if (answer==false){
  			return;
  		}	
  		else{
		onsubmitofrenewal2(cardid, accumulatedcost, update_chk)	
		}		  		
	}	
}

}





function update_renewLYB(){
if (xmlHttp_LYB_Renewal.readyState==4 || xmlHttp_LYB_Renewal.readyState=="complete")
 { 
 var xmlDocument=xmlHttp_LYB_Renewal.responseXML; 	
 answerLYB =xmlDocument.getElementsByTagName("answer1")[0].childNodes[0].nodeValue;
 alert("Update successful.")
 onlogoutLYMRenew()
  }
}	

function onlogoutLYMRenew(){
onfading_LYBbox('100','renewlybdata')	
onappear_LYBbox('0','LYBlogin_box')	
document.getElementById("renew_LYBcard").value = ""
document.getElementById("renew_LYBmember_LName").value = ""
document.getElementById("lybcontenmanin").innerHTML="<div style='background-image: url(pix/lybbrandgirl.JPG);width: 720px; height: 450px;display: inline-block; margin-left: 15px'></div>";


	xmlHttp_LYB_Renewal=GetXmlHttpObject5()
	if (xmlHttp_LYB_Renewal==null)
	 {
	 alert ("Browser does not support HTTP Request")
	 return
	 }
	 var url_LYB_renew = "cookiesetter.php"
	 xmlHttp_LYB_Renewal.onreadystatechange=update_renewLYB
	 xmlHttp_LYB_Renewal.open("GET",url_LYB_renew,true)
	 xmlHttp_LYB_Renewal.send(null)
}	
	
var fadevar = 0;	
function onfading_LYBbox(data,obj){
if(data == "100"){
document.getElementById(obj).style.opacity="1.0";
}
else{
if(parseInt(data) > 9){
document.getElementById(obj).style.opacity="0."+data;	
}	
else{
document.getElementById(obj).style.opacity="0.0"+data;	
}
	
}
document.getElementById(obj).style.filter = "alpha(opacity=" + data + ")";
fadevar = parseInt(data) -1;
if(fadevar > -1){
	 setTimeout("onfading_LYBbox('" + fadevar + "','" + obj + "')", 10) 
}
else{
document.getElementById(obj).style.display = "none"	
}
}	
	
	
function onappear_LYBbox(data,obj){
document.getElementById(obj).style.display = "block"	
if(data == "100"){
document.getElementById(obj).style.opacity="1.0";
}
else{
if(parseInt(data) < 10){
document.getElementById(obj).style.opacity="0.0"+data;	
}	
else{
document.getElementById(obj).style.opacity="0."+data;	
}
	
}

document.getElementById(obj).style.filter = "alpha(opacity=" + data + ")";
fadevar = parseInt(data) +10;
if(fadevar < 101){
	 setTimeout("onappear_LYBbox('" + fadevar + "','" + obj + "')", 10) 
}}		

function showstoreaddr(cardid){
	xmlHttp_LYB_Renewal=GetXmlHttpObject5()
	if (xmlHttp_LYB_Renewal==null)
	 {
	 alert ("Browser does not support HTTP Request")
	 return
	 }
	 var url_LYB_renew="LYBif_renewalready.php?cardid="+cardid;
	 xmlHttp_LYB_Renewal.onreadystatechange=update_ifrenewLYB
	 xmlHttp_LYB_Renewal.open("GET",url_LYB_renew,true)
	 xmlHttp_LYB_Renewal.send(null)
}	


function update_ifrenewLYB() 
{ 
if (xmlHttp_LYB_Renewal.readyState==4 || xmlHttp_LYB_Renewal.readyState=="complete")
 { 
 xmlDoc=xmlHttp_LYB_Renewal.responseXML; 	
 var x =xmlDoc.getElementsByTagName("answer1")[0].childNodes[0].nodeValue;	
  var location =xmlDoc.getElementsByTagName("location")[0].childNodes[0].nodeValue;
	if(x == "fail"){
	alert("Sorry but you already selected " + location + " as the\nplace where you want to claim your card")	
	}
 } 
}

function onsearch_entereddata(data){
document.getElementById(data).value = "";
}
function onsearch_lostfocus(data){
if(document.getElementById(data).value == "")
document.getElementById(data).value = "search";
}

function searchforentereddata(){
var entered_data = 	document.getElementById('searcdata').value
if(entered_data == "" || entered_data == "search"){
alert("Please enter a name first to search for.")	
document.getElementById('searcdata').focus();
document.getElementById('searcdata').value = "";
return;
}

	xmlHttp_LYB_Renewal=GetXmlHttpObject5()
	if (xmlHttp_LYB_Renewal==null)
	 {
	 alert ("Browser does not support HTTP Request")
	 return
	 }
	 var url_LYB_renew="searchdata.php?datasearch="+entered_data;
	 xmlHttp_LYB_Renewal.onreadystatechange=search_data_entered_onview
	 xmlHttp_LYB_Renewal.open("GET",url_LYB_renew,true)
	 xmlHttp_LYB_Renewal.send(null)
}

function search_data_entered_onview(){
if (xmlHttp_LYB_Renewal.readyState==4 || xmlHttp_LYB_Renewal.readyState=="complete")
 { 
 document.getElementById("datafileloader").innerHTML=xmlHttp_LYB_Renewal.responseText 
 } 
}

var pixsizechg = 0;
function show_pix(pixsize1){
document.getElementById('div_main1').style.width = pixsize1
document.getElementById('div_main2').style.width = pixsize1
document.getElementById('div_main3').style.width = pixsize1
document.getElementById('div_main4').style.width = pixsize1
pixsizechg = parseInt(pixsize1) +5;
if(pixsizechg < 231){
	 setTimeout("show_pix('" + pixsizechg + "px')", 10) 
}
}






function onload_selection(str5)
{ 

xmlHttp5=GetXmlHttpObject5()
if (xmlHttp5==null)
 {
 alert ("Browser does not support HTTP Request")
 return
 }
var url5=str5
xmlHttp5.onreadystatechange=selected_onview_http
xmlHttp5.open("GET",url5,true)
xmlHttp5.send(null)
}

function selected_onview_http() 
{ 
if (xmlHttp5.readyState==4 || xmlHttp5.readyState=="complete")

 { 
 document.getElementById("datafileloader").innerHTML=xmlHttp5.responseText 
 
 } 
}


var data_subcatidonload = "";
var data_catidonload = "";

function onappear_LYBbox2(data,obj,dat2,data3){
data_subcatidonload = data3;
data_catidonload = dat2;
document.getElementById(obj).style.display = "block"	
if(data == "100"){
document.getElementById(obj).style.opacity="1.0";
}
else{
if(parseInt(data) < 10){
document.getElementById(obj).style.opacity="0.0"+data;	
}	
else{
document.getElementById(obj).style.opacity="0."+data;	
}
	
}

document.getElementById(obj).style.filter = "alpha(opacity=" + data + ")";
fadevar = parseInt(data) +1;
if(fadevar < 101){
	 setTimeout("onappear_LYBbox2('" + fadevar + "','" + obj + "','" + dat2 + "','" + data3 + "')", 10) 
}
else{
if(dat2 == "" || dat2 == null){
show_pix('0px');	
}
else{
selected_cat_byload(dat2, data3)	
}}}	


function changecolorfont(obj){
document.getElementById(obj).style.cursor="pointer"
document.getElementById(obj).style.color="#E20088"
}

function changecolorfontbck(obj){
document.getElementById(obj).style.cursor="default"
document.getElementById(obj).style.color="#FFFFFF"
}

	function onfadeoutbox(obj,data){
		if(data == "0"){
		document.getElementById(obj).style.opacity="0."+data;
		}
		else{
			if(parseInt(data) > 9){
			document.getElementById(obj).style.opacity="0."+data;	
			}	
			else{
			document.getElementById(obj).style.opacity="0.0"+data;	
			}
		}
	document.getElementById(obj).style.filter = "alpha(opacity=" + data + ")";
	fadevar = parseInt(data) - 10;
		if(fadevar > 5){
		 setTimeout("onfadeoutbox('" + obj + "','" + fadevar + "')", 10) 
		}
		else{
		document.getElementById(obj).style.display='none';
		}
	}	


function selected_cat_byload(str5, str6)
{ 

xmlHttp5=GetXmlHttpObject5()
if (xmlHttp5==null)
 {
 alert ("Browser does not support HTTP Request")
 return
 }
var url5="shopmain_shortcut.php?catid=" + str5 + "&subcatid=" + str6;
xmlHttp5.onreadystatechange=selected_subcat_byload
xmlHttp5.open("GET",url5,true)
xmlHttp5.send(null)
}

function selected_subcat_byload() 
{ 
if (xmlHttp5.readyState==4 || xmlHttp5.readyState=="complete")
 { 
 document.getElementById("datafileloader").innerHTML=xmlHttp5.responseText 
 //onloadbathbodycontet_onload_data(data_catidonload);
 } 
}


function onloadbathbodycontet_onload_data(str){
xmlHttp5=GetXmlHttpObject5()
if (xmlHttp5==null)
 {
 alert ("Browser does not support HTTP Request")
 return
 }
var url_bathbody="shopmaincontent.php?catid="+str;
xmlHttp5.onreadystatechange=stateChanged_bathbodymain_onload_data
xmlHttp5.open("GET",url_bathbody,true)
xmlHttp5.send(null)
}

function stateChanged_bathbodymain_onload_data() 
{ 
if (xmlHttp5.readyState==4 || xmlHttp5.readyState=="complete")
 { 
 document.getElementById("shopcontenmainpage").innerHTML=xmlHttp5.responseText 
 //on_third_load(data_catidonload, data_subcatidonload)
 } 
}



var newsubcatid_3 = "";


function on_third_load(str, str1){
newsubcatid_3 = str1	
xmlHttp5=GetXmlHttpObject5()
if (xmlHttp5==null)
 {
 alert ("Browser does not support HTTP Request")
 return
 }
int1_2 = 1;
int3_2 = 0; 
var url_bathbody="testing123.php?catid="+str+"&catdetID="+str1;
xmlHttp5.onreadystatechange=on_third_load_cat_subcat
xmlHttp5.open("GET",url_bathbody,true)
xmlHttp5.send(null)
}

function on_third_load_cat_subcat() 
{ 
if (xmlHttp5.readyState==4 || xmlHttp5.readyState=="complete")
 { 
 document.getElementById("itemcontentsdatail").innerHTML=xmlHttp5.responseText 
  if(newsubcatid_3 == "springtrendmakeup2010"){
  		var so = new SWFObject("assets/spring_trend_2010.swf", "navi-top", "730", "210", "8", "#ffffff");
   		so.addParam("quality", "high");
   		so.addParam("align", "middle");
   		so.addParam("scale", "noscale");
  		so.addParam("wmode","opaque"); 
   		so.write("flash_container_promo");	 
	 } 
 
 } 
}



function starting_lineup(str, str1){
newsubcatid_3 = str1
window.location.href="products.php?catid="+str+"&subcatid="+str1;
}

function starting_lineup_five() 
{ 
if (xmlHttp_LYB_Renewal.readyState==4 || xmlHttp_LYB_Renewal.readyState=="complete")
 { 
 document.getElementById("itemcontentsdatail").innerHTML=xmlHttp_LYB_Renewal.responseText 
  if(newsubcatid_3 == "springtrendmakeup2010"){
  		var so = new SWFObject("assets/spring_trend_2010.swf", "navi-top", "730", "210", "8", "#ffffff");
   		so.addParam("quality", "high");
   		so.addParam("align", "middle");
   		so.addParam("scale", "noscale");
  		so.addParam("wmode","opaque"); 
   		so.write("flash_container_promo");	 
	 }
 
 } 
}


var dataloaderforvalues = "";
function shorcutfor_aboutus_values(str5)
{ 
  	/*	var so = new SWFObject("loading_sample2.swf", "navi-top", "900", "500", "8", "#ffffff");
   		so.addParam("quality", "high");
   		so.addParam("align", "middle");
   		so.addParam("scale", "noscale");
  		so.addParam("wmode","opaque"); 
   		so.write("datafileloader");  */
dataloaderforvalues = str5
xmlHttp5=GetXmlHttpObject5()
if (xmlHttp5==null)
 {
 alert ("Browser does not support HTTP Request")
 return
 }
var url5="val&campmenu2.php";
xmlHttp5.onreadystatechange=on_shorcutfor_aboutus_values
xmlHttp5.open("GET",url5,true)
xmlHttp5.send(null)
}

function on_shorcutfor_aboutus_values() 
{ 
if (xmlHttp5.readyState==4 || xmlHttp5.readyState=="complete")
 { 
 document.getElementById("datafileloader").innerHTML=xmlHttp5.responseText 
   datacall(dataloaderforvalues);
 } 
}




