// JavaScript Document

//creating http object
function getHTTPObject() {
  var xmlhttp;
 
  if(window.XMLHttpRequest){
    xmlhttp = new XMLHttpRequest();
  }
  else if (window.ActiveXObject){
    xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
    if (!xmlhttp){
        xmlhttp=new ActiveXObject("Msxml2.XMLHTTP");
    }
    
}
  return xmlhttp;

  
}

var http = getHTTPObject(); // We create the HTTP Object

//-----------------------
function update_cart(add_type,payment_type,amount){
		
		if(add_type=="PL"){	
			
		   document.frm_cart.list_type.value=1;
		}
		else
		{
			 document.frm_cart.list_type.value==0;
		}
		document.getElementById("divError").innerHTML="<img src='images/loading.gif'>";
		query="add_type="+add_type+"&payment_type="+payment_type+"&amount="+amount;
		url="shopping_cart.php?"+query;
		var temp=new Array();
		http.open("GET", url, true);
		http.onreadystatechange = function() {
		if (http.readyState == 4) {
		if(http.status==200) {
			  		var results=http.responseText;
					if(results=="The item you have selected is already added into cart"){
						document.getElementById("divError").innerHTML = results;
						if(document.frm_cart.total_amount.value!=0 && document.frm_cart.txt_account_improve.value==1){
								
								document.imgEnd.src="/images/shop_cart_08.jpg";
						}
						else
						{
								//document.imgEnd.src="/images/shop_cart_08.jpg";   // change checkput button from my account section
						}
						
					}
					else{
						document.getElementById("divError").innerHTML="";
						document.getElementById("divCart").innerHTML=results;
						if(document.frm_cart.total_amount.value!=0 && document.frm_cart.txt_account_improve.value==1){
							
								document.imgEnd.src="/images/shop_cart_08.jpg";
								
						}else{
							//	document.imgEnd.src="/images/shop_cart_08.jpg";  //// change checkput button from my account section
						}
						
						
					}
					
					
				  } 
  				}
			};
			http.send(null);


}
function remove_item(id){
	
	document.getElementById("divError").innerHTML="<img src='images/loading.gif'>";
	query="id="+id;
	url="remove_cart_item.php?"+query;
	var temp=new Array();
	http.open("GET", url, true);
	http.onreadystatechange = function() {
	if (http.readyState == 4) {
	if(http.status==200) {
				var results=http.responseText;
				if(results=="The item you have selected is already added into cart"){
					document.getElementById("divError").innerHTML = results;
					if(document.frm_cart.total_amount.value!=0 && document.frm_cart.txt_account_improve.value==1)
					{
						document.imgEnd.src="/images/shop_cart_08.jpg";
					}
					else if(document.frm_cart.total_amount.value==0 && document.frm_cart.txt_account_improve.value==1)
					{
						document.imgEnd.src="/images/shop_cart_16.jpg";	
					}
					else if(document.frm_cart.total_amount.value!=0 && document.frm_cart.txt_account_improve.value==0)
					{
						//document.imgEnd.src="/images/login_features_35.jpg";		
					}
					else if(document.frm_cart.total_amount.value==0 && document.frm_cart.txt_account_improve.value==0)
					{
						//document.imgEnd.src="/images/login_features_37.jpg";		
					}
				}
				else{
					document.getElementById("divError").innerHTML="";
					document.getElementById("divCart").innerHTML=results;
					if(document.frm_cart.total_amount.value!=0 && document.frm_cart.txt_account_improve.value==1)
					{
						document.imgEnd.src="/images/shop_cart_08.jpg";
					}
					else if(document.frm_cart.total_amount.value==0 && document.frm_cart.txt_account_improve.value==1)
					{
						document.imgEnd.src="/images/shop_cart_16.jpg";	
					}
					else if(document.frm_cart.total_amount.value!=0 && document.frm_cart.txt_account_improve.value==0)
					{
						//document.imgEnd.src="/images/login_features_35.jpg";		
					}
					else if(document.frm_cart.total_amount.value==0 && document.frm_cart.txt_account_improve.value==0)
					{
						//document.imgEnd.src="/images/login_features_37.jpg";		
					}
					
				}
				
				
			  } 
			}
		};
		http.send(null);

}

function validate(){
	if(document.frm_cart.total_amount.value==0){
		//document.frm_cart.action="verify.php";
		document.frm_cart.action="welcome.php";
		document.frm_cart.submit();
	}
	else if(document.frm_cart.total_amount.value!=0 && document.frm_cart.ch1.checked==true)
	{
		document.frm_cart.action="improve_payment_options.php?a=additions&type=f";
		document.frm_cart.submit();
	}
	else
	{
		alert("Please read & accept terms and conditions");
		return false;
	}
}
function validate1(){
	if(document.frm_cart.total_amount.value==0){
		//document.frm_cart.action="verify.php";
		document.frm_cart.action="welcome.php";
		document.frm_cart.submit();
	}
	else
	{
		document.frm_cart.action="improve_payment_options_test.php?a=additions&type=f";
		document.frm_cart.submit();
	}
}



function validate_improve(){
	if(document.frm_cart.total_amount.value==0){
		alert("Your shopping cart is emplty, please select item and continue shopping");
		return false;
	}
	else if(document.frm_cart.total_amount.value!=0 && document.frm_cart.ch1.checked==true)
	{
		document.frm_cart.action="improve_payment_options.php?a=additions&type=f";
		document.frm_cart.submit();
	}
	else
	{
			alert("Please read and accept terms & conditions");
			return false;
	}
}
function validate_improve1(){
	if(document.frm_cart.total_amount.value==0){
		alert("Your shopping cart is emplty, please select item and continue shopping");
		return false;
	}
	else
	{
		document.frm_cart.action="improve_payment_options_test.php?a=additions&type=f";
		document.frm_cart.submit();
	}
}

function add_cart(id,choice){
	
	switch(id){
		
		case "gd" : 
			if(choice=="m"){
				if(document.frm_cart.gd[0].checked==false){
					if(document.frm_cart.gd[1].checked==true){
						document.frm_cart.addition_flag2.value=parseInt(document.frm_cart.addition_flag2.value)-1;
					}
					document.frm_cart.gd[0].checked=true;
					document.gd1.src="../images/login_features_32a.png";
					document.gd2.src="../images/login_features_32.png";
					document.frm_cart.addition_flag.value=parseInt(document.frm_cart.addition_flag.value)+1;
					if(document.frm_cart.txt_logo_flag.value==0){  //if logo is available for additions
						document.lg1.src="../images/features_27a.png";
						document.lg2.src="../images/features_27.png";
						document.frm_cart.lg[0].checked=true;
						document.getElementById("divLogoPriceM").innerHTML="$0.00";
						document.getElementById("divLogoPriceY").innerHTML="$24.50";
					}
				}else{
					document.frm_cart.gd[0].checked=false;
					document.gd1.src="../images/login_features_32.png";
					if(document.frm_cart.addition_flag.value!=0){
						document.frm_cart.addition_flag.value=parseInt(document.frm_cart.addition_flag.value)-1;
					}
					if(document.frm_cart.txt_logo_flag.value==0  && document.frm_cart.addition_flag.value==0  && document.frm_cart.addition_flag2.value==0){  //if logo is available for additions
						document.lg1.src="../images/login_features_32.png";
						document.frm_cart.lg[0].checked=false;
						document.getElementById("divLogoPriceM").innerHTML="$2.45";
						document.lg2.src="../images/login_features_32.png";
						document.frm_cart.lg[1].checked=false;
						document.getElementById("divLogoPriceY").innerHTML="$24.50";
					}
					
				}
				
			}else
			{
				if(document.frm_cart.gd[1].checked==false){
					if(document.frm_cart.gd[0].checked==true){
						document.frm_cart.addition_flag.value=parseInt(document.frm_cart.addition_flag.value)-1;
					}
					document.frm_cart.gd[1].checked=true;
					document.gd2.src="../images/login_features_32a.png";
					document.gd1.src="../images/login_features_32.png";
					document.frm_cart.addition_flag2.value=parseInt(document.frm_cart.addition_flag2.value)+1;
					if(document.frm_cart.txt_logo_flag.value==0){  //if logo is available for additions
						document.lg2.src="../images/login_features_32a.png";
						document.lg1.src="../images/login_features_32.png";
						document.frm_cart.lg[1].checked=true;
						document.getElementById("divLogoPriceY").innerHTML="$0.00";
						document.getElementById("divLogoPriceM").innerHTML="$2.45";
					}
				}else{
					document.frm_cart.gd[1].checked=false;
					document.gd2.src="../images/login_features_32.png";
					if(document.frm_cart.addition_flag2.value!=0){
						document.frm_cart.addition_flag2.value=parseInt(document.frm_cart.addition_flag2.value)-1;
					}
					if(document.frm_cart.txt_logo_flag.value==0 && document.frm_cart.addition_flag2.value==0 && document.frm_cart.addition_flag2.value==0){  //if logo is available for additions
						document.lg1.src="../images/login_features_32.png";
						document.frm_cart.lg[0].checked=false;
						document.getElementById("divLogoPriceM").innerHTML="$2.45";
						document.lg2.src="../images/login_features_32.png";
						document.frm_cart.lg[1].checked=false;
						document.getElementById("divLogoPriceY").innerHTML="$24.50";
					}
				}
				
			}
		break;
		case "mn" : 
			if(choice=="m"){
					if(document.frm_cart.mn[0].checked==false){
						if(document.frm_cart.mn[1].checked==true){
						document.frm_cart.addition_flag2.value=parseInt(document.frm_cart.addition_flag2.value)-1;
						}
						document.frm_cart.mn[0].checked=true;
						document.mn1.src="../images/login_features_32a.png";
						document.mn2.src="../images/login_features_32.png";
						document.frm_cart.addition_flag.value=parseInt(document.frm_cart.addition_flag.value)+1;
						if(document.frm_cart.txt_logo_flag.value==0){  //if logo is available for additions
							document.lg1.src="../images/features_27a.png";
							document.lg2.src="../images/features_27.png";
							document.frm_cart.lg[0].checked=true;
							document.getElementById("divLogoPriceM").innerHTML="$0.00";
							document.getElementById("divLogoPriceY").innerHTML="$24.50";
						}
					}else{
						document.frm_cart.mn[0].checked=false;
						document.mn1.src="../images/login_features_32.png";
						if(document.frm_cart.addition_flag.value!=0){
							document.frm_cart.addition_flag.value=parseInt(document.frm_cart.addition_flag.value)-1;
						}
						if(document.frm_cart.txt_logo_flag.value==0 && document.frm_cart.addition_flag.value==0 && document.frm_cart.addition_flag2.value==0){  //if logo is available for additions
							document.lg1.src="../images/login_features_32.png";
							document.frm_cart.lg[0].checked=false;
							document.getElementById("divLogoPriceM").innerHTML="$2.45";
							document.lg2.src="../images/login_features_32.png";
							document.frm_cart.lg[1].checked=false;
							document.getElementById("divLogoPriceY").innerHTML="$24.50";
						}
						
					}
					
				}else
				{
					if(document.frm_cart.mn[1].checked==false){
						if(document.frm_cart.mn[0].checked==true){
							document.frm_cart.addition_flag.value=parseInt(document.frm_cart.addition_flag.value)-1;
						}
						document.frm_cart.mn[1].checked=true;
						document.mn2.src="../images/login_features_32a.png";
						document.mn1.src="../images/login_features_32.png";
						document.frm_cart.addition_flag2.value=parseInt(document.frm_cart.addition_flag2.value)+1;
						if(document.frm_cart.txt_logo_flag.value==0){  //if logo is available for additions
						document.lg2.src="../images/login_features_32a.png";
						document.lg1.src="../images/login_features_32.png";
						document.frm_cart.lg[1].checked=true;
						document.getElementById("divLogoPriceY").innerHTML="$0.00";
						document.getElementById("divLogoPriceM").innerHTML="$2.45";
					}
					}else{
						document.frm_cart.mn[1].checked=false;
						document.mn2.src="../images/login_features_32.png";
						if(document.frm_cart.addition_flag2.value!=0){
							document.frm_cart.addition_flag2.value=parseInt(document.frm_cart.addition_flag2.value)-1;
						}
						if(document.frm_cart.txt_logo_flag.value==0 && document.frm_cart.addition_flag2.value==0 && document.frm_cart.addition_flag.value==0){  //if logo is available for additions
							document.lg1.src="../images/login_features_32.png";
							document.frm_cart.lg[0].checked=false;
							document.getElementById("divLogoPriceM").innerHTML="$2.45";
							document.lg2.src="../images/login_features_32.png";
							document.frm_cart.lg[1].checked=false;
							document.getElementById("divLogoPriceY").innerHTML="$24.50";
						}
					}
			}
		break;
		case "wb" : 
			if(choice=="m"){
				if(document.frm_cart.wb[0].checked==false){
					if(document.frm_cart.wb[1].checked==true){
						document.frm_cart.addition_flag2.value=parseInt(document.frm_cart.addition_flag2.value)-1;
					}
					document.frm_cart.wb[0].checked=true;
					document.wb1.src="../images/login_features_32a.png";
					document.wb2.src="../images/login_features_32.png";
					document.frm_cart.addition_flag.value=parseInt(document.frm_cart.addition_flag.value)+1;
					if(document.frm_cart.txt_logo_flag.value==0){  //if logo is available for additions
						document.lg1.src="../images/features_27a.png";
						document.lg2.src="../images/features_27.png";
						document.frm_cart.lg[0].checked=true;
						document.getElementById("divLogoPriceM").innerHTML="$0.00";
						document.getElementById("divLogoPriceY").innerHTML="$24.50";
					}
				}else{
					document.frm_cart.wb[0].checked=false;
					document.wb1.src="../images/login_features_32.png";
					if(document.frm_cart.addition_flag.value!=0){
							document.frm_cart.addition_flag.value=parseInt(document.frm_cart.addition_flag.value)-1;
						}
					if(document.frm_cart.txt_logo_flag.value==0 && document.frm_cart.addition_flag.value==0 && document.frm_cart.addition_flag2.value==0){  //if logo is available for additions
						document.lg1.src="../images/login_features_32.png";
						document.frm_cart.lg[0].checked=false;
						document.getElementById("divLogoPriceM").innerHTML="$2.45";
						document.lg2.src="../images/login_features_32.png";
						document.frm_cart.lg[1].checked=false;
						document.getElementById("divLogoPriceY").innerHTML="$24.50";
					}
					
				}
				
			}else
			{
				if(document.frm_cart.wb[1].checked==false){
					if(document.frm_cart.wb[0].checked==true){
						document.frm_cart.addition_flag.value=parseInt(document.frm_cart.addition_flag.value)-1;
					}
					document.frm_cart.wb[1].checked=true;
					document.wb2.src="../images/login_features_32a.png";
					document.wb1.src="../images/login_features_32.png";
					document.frm_cart.addition_flag2.value=parseInt(document.frm_cart.addition_flag2.value)+1;
					if(document.frm_cart.txt_logo_flag.value==0){  //if logo is available for additions
						document.lg2.src="../images/login_features_32a.png";
						document.lg1.src="../images/login_features_32.png";
						document.frm_cart.lg[1].checked=true;
						document.getElementById("divLogoPriceY").innerHTML="$0.00";
						document.getElementById("divLogoPriceM").innerHTML="$2.45";
					}
				}else{
					document.frm_cart.wb[1].checked=false;
					document.wb2.src="../images/login_features_32.png";
					if(document.frm_cart.addition_flag2.value!=0){
							document.frm_cart.addition_flag2.value=parseInt(document.frm_cart.addition_flag2.value)-1;
						}
					if(document.frm_cart.txt_logo_flag.value==0 && document.frm_cart.addition_flag2.value==0 && document.frm_cart.addition_flag.value==0){  //if logo is available for additions
						document.lg1.src="../images/login_features_32.png";
						document.frm_cart.lg[0].checked=false;
						document.getElementById("divLogoPriceM").innerHTML="$2.45";
						document.lg2.src="../images/login_features_32.png";
						document.frm_cart.lg[1].checked=false;
						document.getElementById("divLogoPriceY").innerHTML="$24.50";
					}
				}
				
			}
		break;
		case "lg" : 
			if(choice=="m"){
				if(document.frm_cart.lg[0].checked==false){
				document.frm_cart.lg[0].checked=true;
				document.lg1.src="../images/login_features_32a.png";
				document.lg2.src="../images/login_features_32.png";
				}else{
					document.frm_cart.lg[0].checked=false;
					document.lg1.src="../images/login_features_32.png";
					
					
				}
				
			}else
			{
				if(document.frm_cart.lg[1].checked==false){
					document.frm_cart.lg[1].checked=true;
					document.lg2.src="../images/login_features_32a.png";
					document.lg1.src="../images/login_features_32.png";
				}else{
					document.frm_cart.lg[1].checked=false;
					document.lg2.src="../images/login_features_32.png";
				}
				
			}
		break;
		case "br" : 
			if(choice=="m"){
				if(document.frm_cart.br[0].checked==false){
					if(document.frm_cart.br[1].checked==true){
						document.frm_cart.addition_flag2.value=parseInt(document.frm_cart.addition_flag2.value)-1;
					}
					document.frm_cart.br[0].checked=true;
					document.br1.src="../images/login_features_32a.png";
					document.br2.src="../images/login_features_32.png";
					document.frm_cart.addition_flag.value=parseInt(document.frm_cart.addition_flag.value)+1;
					if(document.frm_cart.txt_logo_flag.value==0){  //if logo is available for additions
						document.lg1.src="../images/features_27a.png";
						document.lg2.src="../images/features_27.png";
						document.frm_cart.lg[0].checked=true;
						document.getElementById("divLogoPriceM").innerHTML="$0.00";
						document.getElementById("divLogoPriceY").innerHTML="$24.50";
					}
				}else{
					document.frm_cart.br[0].checked=false;
					document.br1.src="../images/login_features_32.png";
					if(document.frm_cart.addition_flag.value!=0){
							document.frm_cart.addition_flag.value=parseInt(document.frm_cart.addition_flag.value)-1;
						}
					if(document.frm_cart.txt_logo_flag.value==0 && document.frm_cart.addition_flag.value==0 && document.frm_cart.addition_flag2.value==0){  //if logo is available for additions
						document.lg1.src="../images/login_features_32.png";
						document.frm_cart.lg[0].checked=false;
						document.getElementById("divLogoPriceM").innerHTML="$2.45";
						document.lg2.src="../images/login_features_32.png";
						document.frm_cart.lg[1].checked=false;
						document.getElementById("divLogoPriceY").innerHTML="$24.50";
					}
					
				}
				
			}else
			{
				if(document.frm_cart.br[1].checked==false){
					if(document.frm_cart.br[0].checked==true){
						document.frm_cart.addition_flag.value=parseInt(document.frm_cart.addition_flag.value)-1;
					}
					document.frm_cart.br[1].checked=true;
					document.br2.src="../images/login_features_32a.png";
					document.br1.src="../images/login_features_32.png";
					document.frm_cart.addition_flag2.value=parseInt(document.frm_cart.addition_flag2.value)+1;
					if(document.frm_cart.txt_logo_flag.value==0){  //if logo is available for additions
						document.lg2.src="../images/login_features_32a.png";
						document.lg1.src="../images/login_features_32.png";
						document.frm_cart.lg[1].checked=true;
						document.getElementById("divLogoPriceY").innerHTML="$0.00";
						document.getElementById("divLogoPriceM").innerHTML="$2.45";
					}
				}else{
					document.frm_cart.br[1].checked=false;
					document.br2.src="../images/login_features_32.png";
					if(document.frm_cart.addition_flag2.value!=0){
							document.frm_cart.addition_flag2.value=parseInt(document.frm_cart.addition_flag2.value)-1;
						}
					if(document.frm_cart.txt_logo_flag.value==0 && document.frm_cart.addition_flag2.value==0 && document.frm_cart.addition_flag.value==0){  //if logo is available for additions
						document.lg1.src="../images/login_features_32.png";
						document.frm_cart.lg[0].checked=false;
						document.getElementById("divLogoPriceM").innerHTML="$2.45";
						document.lg2.src="../images/login_features_32.png";
						document.frm_cart.lg[1].checked=false;
						document.getElementById("divLogoPriceY").innerHTML="$24.50";
					}
				}
				
			}
		break;
		case "db" : 
			if(choice=="m"){
				if(document.frm_cart.db[0].checked==false){
					if(document.frm_cart.db[1].checked==true){
						document.frm_cart.addition_flag2.value=parseInt(document.frm_cart.addition_flag2.value)-1;
					}
					document.frm_cart.db[0].checked=true;
					document.db1.src="../images/login_features_32a.png";
					document.db2.src="../images/login_features_32.png";
					document.frm_cart.addition_flag.value=parseInt(document.frm_cart.addition_flag.value)+1;
					if(document.frm_cart.txt_logo_flag.value==0){  //if logo is available for additions
						document.lg1.src="../images/features_27a.png";
						document.lg2.src="../images/features_27.png";
						document.frm_cart.lg[0].checked=true;
						document.getElementById("divLogoPriceM").innerHTML="$0.00";
						document.getElementById("divLogoPriceY").innerHTML="$24.50";
					}
				}else{
					document.frm_cart.db[0].checked=false;
					document.db1.src="../images/login_features_32.png";
					if(document.frm_cart.addition_flag.value!=0){
							document.frm_cart.addition_flag.value=parseInt(document.frm_cart.addition_flag.value)-1;
						}
					if(document.frm_cart.txt_logo_flag.value==0 && document.frm_cart.addition_flag.value==0 && document.frm_cart.addition_flag2.value==0){  //if logo is available for additions
						document.lg1.src="../images/login_features_32.png";
						document.frm_cart.lg[0].checked=false;
						document.getElementById("divLogoPriceM").innerHTML="$2.45";
						document.lg2.src="../images/login_features_32.png";
						document.frm_cart.lg[1].checked=false;
						document.getElementById("divLogoPriceY").innerHTML="$24.50";
					}
					
				}
				
			}else
			{
				if(document.frm_cart.db[1].checked==false){
					if(document.frm_cart.db[0].checked==true){
						document.frm_cart.addition_flag.value=parseInt(document.frm_cart.addition_flag.value)-1;
					}
					document.frm_cart.db[1].checked=true;
					document.db2.src="../images/login_features_32a.png";
					document.db1.src="../images/login_features_32.png";
					document.frm_cart.addition_flag2.value=parseInt(document.frm_cart.addition_flag2.value)+1;
					if(document.frm_cart.txt_logo_flag.value==0){  //if logo is available for additions
						document.lg2.src="../images/login_features_32a.png";
						document.lg1.src="../images/login_features_32.png";
						document.frm_cart.lg[1].checked=true;
						document.getElementById("divLogoPriceY").innerHTML="$0.00";
						document.getElementById("divLogoPriceM").innerHTML="$2.45";
					}
				}else{
					document.frm_cart.db[1].checked=false;
					document.db2.src="../images/login_features_32.png";
					if(document.frm_cart.addition_flag2.value!=0){
							document.frm_cart.addition_flag2.value=parseInt(document.frm_cart.addition_flag2.value)-1;
						}
					if(document.frm_cart.txt_logo_flag.value==0 && document.frm_cart.addition_flag2.value==0 && document.frm_cart.addition_flag.value==0){  //if logo is available for additions
						document.lg1.src="../images/login_features_32.png";
						document.frm_cart.lg[0].checked=false;
						document.getElementById("divLogoPriceM").innerHTML="$2.45";
						document.lg2.src="../images/login_features_32.png";
						document.frm_cart.lg[1].checked=false;
						document.getElementById("divLogoPriceY").innerHTML="$24.50";
					}
				}
				
			}
		break;
		case "pl" : 
			
			if(document.frm_cart.txtGD.value==0){     //if the user not already adddeed gold placement
				document.frm_cart.gd[1].checked=false;
				document.frm_cart.gd[0].checked=false;
				document.gd1.src="../images/login_features_32.png";
				document.gd2.src="../images/login_features_32.png";
			}
			if(document.frm_cart.txtMN.value==0){
				document.frm_cart.mn[0].checked=false;
				document.frm_cart.mn[1].checked=false;
				document.mn1.src="../images/login_features_32.png";
				document.mn2.src="../images/login_features_32.png";
			}
			if(document.frm_cart.txtWB.value==0){
				document.frm_cart.wb[0].checked=false;
				document.frm_cart.wb[1].checked=false;
				document.wb1.src="../images/login_features_32.png";
				document.wb2.src="../images/login_features_32.png";
			}
			if(document.frm_cart.txtLG.value==0){
				document.frm_cart.lg[0].checked=false;
				document.frm_cart.lg[1].checked=false;
				document.lg1.src="../images/login_features_32.png";
				document.lg2.src="../images/login_features_32.png";
			}
			if(document.frm_cart.txtBR.value==0){
				document.frm_cart.br[0].checked=false;
				document.frm_cart.br[1].checked=false;
				document.br1.src="../images/login_features_32.png";
				document.br2.src="../images/login_features_32.png";
			}
			if(document.frm_cart.txtDB.value==0){
				document.frm_cart.db[0].checked=false;
				document.frm_cart.db[1].checked=false;
				document.db1.src="../images/login_features_32.png";
				document.db2.src="../images/login_features_32.png";
			}
			
			
			
			
			
			
			document.pl1.src="../images/login_features_32.png";
			document.pl2.src="../images/login_features_32.png";
			if(choice=="m"){
				if(document.frm_cart.pl[0].checked==false){
				document.frm_cart.pl[0].checked=true;
				document.pl1.src="../images/login_features_32a.png";
				document.pl2.src="../images/login_features_32.png";
				}else{
					document.frm_cart.pl[0].checked=false;
					document.pl1.src="../images/login_features_32.png";
					
				}
				
			}else
			{
				if(document.frm_cart.pl[1].checked==false){
					document.frm_cart.pl[1].checked=true;
					document.pl2.src="../images/login_features_32a.png";
					document.pl1.src="../images/login_features_32.png";
				}else{
					document.frm_cart.pl[1].checked=false;
					document.pl2.src="../images/login_features_32.png";
				}
				
			}
		break;
		
	}
}
function change_button(id,choice){
	
	switch(id){
		case "gd" : 
			if(choice=="m"){
					if(document.frm_cart.gd[0].checked==true)
						{
							
							document.gd1.src="../images/login_features_32a.png";
							document.gd2.src="../images/login_features_32.png";
							if(document.frm_cart.txt_logo_flag.value==0){  //if logo is available for additions
								document.lg1.src="../images/login_features_32a.png";
								document.lg2.src="../images/login_features_32.png";
								document.frm_cart.lg[0].checked=true;
								document.getElementById("divLogoPriceM").innerHTML="$0.00";
								document.getElementById("divLogoPriceY").innerHTML="$24.50";
							   }
						}
						else
						{
							document.gd1.src="../images/login_features_32a.png";
							document.gd2.src="../images/login_features_32.png";
							if(document.frm_cart.txt_logo_flag.value==0){  //if logo is available for additions
								document.lg1.src="../images/login_features_32.png";
								document.lg2.src="../images/login_features_32a.png";
								document.frm_cart.lg[0].checked=false;
								document.getElementById("divLogoPriceM").innerHTML="$2.45";
								
							}
						}
				}
				else
				{
					
					if(document.frm_cart.gd[1].checked==true){
						document.gd1.src="../images/login_features_32.png";
						document.gd2.src="../images/login_features_32a.png";
						if(document.frm_cart.txt_logo_flag.value==0){  //if logo is available for additions
							document.lg2.src="../images/login_features_32a.png";
							document.lg1.src="../images/login_features_32.png";
							document.frm_cart.lg[1].checked=true;
							document.getElementById("divLogoPriceY").innerHTML="$0.00";
							document.getElementById("divLogoPriceM").innerHTML="$2.45";
						}
						
					}
				}
		break;
		case "mn" : 
			if(choice=="m"){
					if(document.frm_cart.mn[0].checked==true)
						{
							
							document.mn1.src="../images/login_features_32a.png";
							document.mn2.src="../images/login_features_32.png";
							if(document.frm_cart.txt_logo_flag.value==0){  //if logo is available for additions
								document.lg1.src="../images/login_features_32a.png";
								document.lg2.src="../images/login_features_32.png";
								document.frm_cart.lg[0].checked=true;
								document.getElementById("divLogoPriceM").innerHTML="$0.00";
								document.getElementById("divLogoPriceY").innerHTML="$24.50";
							   }
						}
						else
						{
							document.mn1.src="../images/login_features_32a.png";
							document.mn2.src="../images/login_features_32.png";
							if(document.frm_cart.txt_logo_flag.value==0){  //if logo is available for additions
								document.lg1.src="../images/login_features_32.png";
								document.lg2.src="../images/login_features_32a.png";
								document.frm_cart.lg[0].checked=false;
								document.getElementById("divLogoPriceM").innerHTML="$2.45";
								
							}
						}
				}
				else
				{
					
					if(document.frm_cart.mn[1].checked==true){
						document.mn1.src="../images/login_features_32.png";
						document.mn2.src="../images/login_features_32a.png";
						if(document.frm_cart.txt_logo_flag.value==0){  //if logo is available for additions
							document.lg2.src="../images/login_features_32a.png";
							document.lg1.src="../images/login_features_32.png";
							document.frm_cart.lg[1].checked=true;
							document.getElementById("divLogoPriceY").innerHTML="$0.00";
							document.getElementById("divLogoPriceM").innerHTML="$2.45";
						}
					}
				}
		break;
		case "wb" : 
			if(choice=="m"){
					if(document.frm_cart.wb[0].checked==true)
						{
							
							document.wb1.src="../images/login_features_32a.png";
							document.wb2.src="../images/login_features_32.png";
							if(document.frm_cart.txt_logo_flag.value==0){  //if logo is available for additions
								document.lg1.src="../images/login_features_32a.png";
								document.lg2.src="../images/login_features_32.png";
								document.frm_cart.lg[0].checked=true;
								document.getElementById("divLogoPriceM").innerHTML="$0.00";
								document.getElementById("divLogoPriceY").innerHTML="$24.50";
							   }
						}
						else
						{
							document.wb1.src="../images/login_features_32a.png";
							document.wb2.src="../images/login_features_32.png";
							if(document.frm_cart.txt_logo_flag.value==0){  //if logo is available for additions
								document.lg1.src="../images/login_features_32.png";
								document.lg2.src="../images/login_features_32a.png";
								document.frm_cart.lg[0].checked=false;
								document.getElementById("divLogoPriceM").innerHTML="$2.45";
								
							}
						}
				}
				else
				{
					
					if(document.frm_cart.wb[1].checked==true){
						document.wb1.src="../images/login_features_32.png";
						document.wb2.src="../images/login_features_32a.png";
						if(document.frm_cart.txt_logo_flag.value==0){  //if logo is available for additions
							document.lg2.src="../images/login_features_32a.png";
							document.lg1.src="../images/login_features_32.png";
							document.frm_cart.lg[1].checked=true;
							document.getElementById("divLogoPriceY").innerHTML="$0.00";
							document.getElementById("divLogoPriceM").innerHTML="$2.45";
						}
					}
				}
		break;
		case "lg" : 
			if(choice=="m"){
					if(document.frm_cart.lg[0].checked==true)
						{
							
							document.lg1.src="../images/login_features_32a.png";
							document.lg2.src="../images/login_features_32.png";
						}
						else
						{
							document.lg1.src="../images/login_features_32a.png";
							document.lg2.src="../images/login_features_32.png";
						}
				}
				else
				{
					
					if(document.frm_cart.lg[1].checked==true){
						document.lg1.src="../images/login_features_32.png";
						document.lg2.src="../images/login_features_32a.png";
					}
				}
		break;
		case "br" : 
			if(choice=="m"){
					if(document.frm_cart.br[0].checked==true)
						{
							
							document.br1.src="../images/login_features_32a.png";
							document.br2.src="../images/login_features_32.png";
							if(document.frm_cart.txt_logo_flag.value==0){  //if logo is available for additions
								document.lg1.src="../images/login_features_32a.png";
								document.lg2.src="../images/login_features_32.png";
								document.frm_cart.lg[0].checked=true;
								document.getElementById("divLogoPriceM").innerHTML="$0.00";
								document.getElementById("divLogoPriceY").innerHTML="$24.50";
							   }
						}
						else
						{
							document.br1.src="../images/login_features_32a.png";
							document.br2.src="../images/login_features_32.png";
							if(document.frm_cart.txt_logo_flag.value==0){  //if logo is available for additions
								document.lg1.src="../images/login_features_32.png";
								document.lg2.src="../images/login_features_32a.png";
								document.frm_cart.lg[0].checked=false;
								document.getElementById("divLogoPriceM").innerHTML="$2.45";
								
							}
						}
				}
				else
				{
					
					if(document.frm_cart.br[1].checked==true){
						document.br1.src="../images/login_features_32.png";
						document.br2.src="../images/login_features_32a.png";
						if(document.frm_cart.txt_logo_flag.value==0){  //if logo is available for additions
							document.lg2.src="../images/login_features_32a.png";
							document.lg1.src="../images/login_features_32.png";
							document.frm_cart.lg[1].checked=true;
							document.getElementById("divLogoPriceY").innerHTML="$0.00";
							document.getElementById("divLogoPriceM").innerHTML="$2.45";
						}
					}
				}
		break;
		case "db" : 
			if(choice=="m"){
					if(document.frm_cart.db[0].checked==true)
						{
							
							document.db1.src="../images/login_features_32a.png";
							document.db2.src="../images/login_features_32.png";
							if(document.frm_cart.txt_logo_flag.value==0){  //if logo is available for additions
								document.lg1.src="../images/login_features_32a.png";
								document.lg2.src="../images/login_features_32.png";
								document.frm_cart.lg[0].checked=true;
								document.getElementById("divLogoPriceM").innerHTML="$0.00";
								document.getElementById("divLogoPriceY").innerHTML="$24.50";
							   }
						}
						else
						{
							document.db1.src="../images/login_features_32a.png";
							document.db2.src="../images/login_features_32.png";
							if(document.frm_cart.txt_logo_flag.value==0){  //if logo is available for additions
								document.lg1.src="../images/login_features_32.png";
								document.lg2.src="../images/login_features_32a.png";
								document.frm_cart.lg[0].checked=false;
								document.getElementById("divLogoPriceM").innerHTML="$2.45";
							}
						}
				}
				else
				{
					
					if(document.frm_cart.db[1].checked==true){
						document.db1.src="../images/login_features_32.png";
						document.db2.src="../images/login_features_32a.png";
						if(document.frm_cart.txt_logo_flag.value==0){  //if logo is available for additions
							document.lg2.src="../images/login_features_32a.png";
							document.lg1.src="../images/login_features_32.png";
							document.frm_cart.lg[1].checked=true;
							document.getElementById("divLogoPriceY").innerHTML="$0.00";
							document.getElementById("divLogoPriceM").innerHTML="$2.45";
						}
					}
				}
		break;
		case "pl" : 
			document.frm_cart.gd[1].checked=false;
			document.frm_cart.gd[0].checked=false;
			document.frm_cart.mn[0].checked=false;
			document.frm_cart.mn[1].checked=false;
			document.frm_cart.wb[0].checked=false;
			document.frm_cart.wb[1].checked=false;
			document.frm_cart.lg[0].checked=false;
			document.frm_cart.lg[1].checked=false;
			document.frm_cart.br[0].checked=false;
			document.frm_cart.br[1].checked=false;
			document.frm_cart.db[0].checked=false;
			document.frm_cart.db[1].checked=false;
			if(choice=="m"){
					if(document.frm_cart.pl[0].checked==true)
						{
							
							document.pl1.src="../images/login_features_32a.png";
							document.pl2.src="../images/login_features_32.png";
						}
						else
						{
							document.pl1.src="../images/login_features_32a.png";
							document.pl2.src="../images/login_features_32.png";
						}
				}
				else
				{
					
					if(document.frm_cart.pl[1].checked==true){
						document.pl1.src="../images/login_features_32.png";
						document.pl2.src="../images/login_features_32a.png";
					}
				}
		break;
		
	}
	
}
//this function will work when click button
function add_cart_preview(id,choice){
	switch(id){
		
		case "gd" : 
			if(choice=="m"){
				if(document.frm_cart.gd[0].checked==false){
					if(document.frm_cart.gd[1].checked==true){
						document.frm_cart.addition_flag2.value=parseInt(document.frm_cart.addition_flag2.value)-1;
					}
					document.frm_cart.gd[0].checked=true;
					document.gd1.src="/images/features_27a.png";
					document.gd2.src="/images/features_27.png";
					document.lg1.src="/images/features_27a.png";
					document.lg2.src="/images/features_27.png";
					document.frm_cart.lg[0].checked=true;
					document.getElementById("divLogoPriceM").innerHTML="$0.00";
					document.getElementById("divLogoPriceY").innerHTML="$24.50";
					document.frm_cart.addition_flag.value=parseInt(document.frm_cart.addition_flag.value)+1;
				}else{
					
					document.frm_cart.gd[0].checked=false;
					document.gd1.src="/images/features_27.png";
					if(document.frm_cart.addition_flag.value!=0){
						document.frm_cart.addition_flag.value=parseInt(document.frm_cart.addition_flag.value)-1;
					}
					if(document.frm_cart.addition_flag.value==0 && document.frm_cart.addition_flag2.value==0){
						document.lg1.src="/images/features_27.png";
						document.frm_cart.lg[0].checked=false;
						document.getElementById("divLogoPriceM").innerHTML="$2.45";
						document.lg2.src="/images/features_27.png";
						document.frm_cart.lg[1].checked=false;
						document.getElementById("divLogoPriceY").innerHTML="$24.50";
					}
					
					
				}
				
			}else
			{
				if(document.frm_cart.gd[1].checked==false){
					if(document.frm_cart.gd[0].checked==true){
						document.frm_cart.addition_flag.value=parseInt(document.frm_cart.addition_flag.value)-1;
					}
					document.frm_cart.gd[1].checked=true;
					document.gd2.src="/images/features_27a.png";
					document.gd1.src="/images/features_27.png";
					document.lg2.src="/images/features_27a.png";
					document.lg1.src="/images/features_27.png";
					document.frm_cart.lg[1].checked=true;
					document.getElementById("divLogoPriceY").innerHTML="$0.00";
					document.getElementById("divLogoPriceM").innerHTML="$2.45";
					document.frm_cart.addition_flag2.value=parseInt(document.frm_cart.addition_flag2.value)+1;
				}else{
					document.frm_cart.gd[1].checked=false;
					document.gd2.src="/images/features_27.png";
					if(document.frm_cart.addition_flag2.value!=0){
						document.frm_cart.addition_flag2.value=parseInt(document.frm_cart.addition_flag2.value)-1;
					}
					if(document.frm_cart.addition_flag2.value==0 && document.frm_cart.addition_flag.value==0){
						document.lg2.src="/images/features_27.png";
						document.frm_cart.lg[1].checked=false;
						document.getElementById("divLogoPriceY").innerHTML="$24.50";
						document.lg1.src="/images/features_27.png";
						document.frm_cart.lg[0].checked=false;
						document.getElementById("divLogoPriceM").innerHTML="$2.45";
					}
				
					
				}
				
			}
		break;
		case "mn" : 
			if(choice=="m"){
					if(document.frm_cart.mn[0].checked==false){
						if(document.frm_cart.mn[1].checked==true){
							document.frm_cart.addition_flag2.value=parseInt(document.frm_cart.addition_flag2.value)-1;
						}
						document.frm_cart.mn[0].checked=true;
						document.mn1.src="/images/features_27a.png";
						document.mn2.src="/images/features_27.png";
						document.lg1.src="/images/features_27a.png";
						document.lg2.src="/images/features_27.png";
						document.frm_cart.lg[0].checked=true;
						document.getElementById("divLogoPriceM").innerHTML="$0.00";
						document.getElementById("divLogoPriceY").innerHTML="$24.50";
						document.frm_cart.addition_flag.value=parseInt(document.frm_cart.addition_flag.value)+1;
					}else{
							document.frm_cart.mn[0].checked=false;
							document.mn1.src="/images/features_27.png";
							if(document.frm_cart.addition_flag.value!=0){
								document.frm_cart.addition_flag.value=parseInt(document.frm_cart.addition_flag.value)-1;
							}
							if(document.frm_cart.addition_flag.value==0 && document.frm_cart.addition_flag2.value==0){
									document.lg2.src="/images/features_27.png";
									document.frm_cart.lg[1].checked=false;
									document.getElementById("divLogoPriceY").innerHTML="$24.50";
									document.lg1.src="/images/features_27.png";
									document.frm_cart.lg[0].checked=false;
									document.getElementById("divLogoPriceM").innerHTML="$2.45";
							}
							
							
							
						}
					
				}else
				{
					if(document.frm_cart.mn[1].checked==false){
						if(document.frm_cart.mn[0].checked==true){
							document.frm_cart.addition_flag.value=parseInt(document.frm_cart.addition_flag.value)-1;
						}
						document.frm_cart.mn[1].checked=true;
						document.mn2.src="/images/features_27a.png";
						document.mn1.src="/images/features_27.png";
						document.lg2.src="/images/features_27a.png";
						document.lg1.src="/images/features_27.png";
						document.frm_cart.lg[1].checked=true;
						document.getElementById("divLogoPriceY").innerHTML="$0.00";
						document.getElementById("divLogoPriceM").innerHTML="$2.45";
						document.frm_cart.addition_flag2.value=parseInt(document.frm_cart.addition_flag2.value)+1;
					}else{
						document.frm_cart.mn[1].checked=false;
						document.mn2.src="/images/features_27.png";
						if(document.frm_cart.addition_flag2.value!=0){
							document.frm_cart.addition_flag2.value=parseInt(document.frm_cart.addition_flag2.value)-1;
						}
						if(document.frm_cart.addition_flag2.value==0 && document.frm_cart.addition_flag.value==0){
								document.lg2.src="/images/features_27.png";
								document.frm_cart.lg[1].checked=false;
								document.getElementById("divLogoPriceY").innerHTML="$24.50";
								document.lg1.src="/images/features_27.png";
								document.frm_cart.lg[0].checked=false;
								document.getElementById("divLogoPriceM").innerHTML="$2.45";
						}
					
						
					}
			}
		break;
		case "wb" : 
			if(choice=="m"){
				if(document.frm_cart.wb[0].checked==false){
						if(document.frm_cart.wb[1].checked==true){
							document.frm_cart.addition_flag2.value=parseInt(document.frm_cart.addition_flag2.value)-1;
						}
						document.frm_cart.wb[0].checked=true;
						document.wb1.src="/images/features_27a.png";
						document.wb2.src="/images/features_27.png";
						document.lg1.src="/images/features_27a.png";
						document.lg2.src="/images/features_27.png";
						document.frm_cart.lg[0].checked=true;
						document.getElementById("divLogoPriceM").innerHTML="$0.00";
						document.getElementById("divLogoPriceY").innerHTML="$24.50";
						document.frm_cart.addition_flag.value=parseInt(document.frm_cart.addition_flag.value)+1;
				}else{
						document.frm_cart.wb[0].checked=false;
						document.wb1.src="/images/features_27.png";
						if(document.frm_cart.addition_flag.value!=0){
							document.frm_cart.addition_flag.value=parseInt(document.frm_cart.addition_flag.value)-1;
						}
						if(document.frm_cart.addition_flag.value==0 && document.frm_cart.addition_flag2.value==0){
								document.lg2.src="/images/features_27.png";
								document.frm_cart.lg[1].checked=false;
								document.getElementById("divLogoPriceY").innerHTML="$24.50";
								document.lg1.src="/images/features_27.png";
								document.frm_cart.lg[0].checked=false;
								document.getElementById("divLogoPriceM").innerHTML="$2.45";
						}
						
						
						
					
					
				}
				
			}else
			{
				if(document.frm_cart.wb[1].checked==false){
					if(document.frm_cart.wb[0].checked==true){
							document.frm_cart.addition_flag.value=parseInt(document.frm_cart.addition_flag.value)-1;
						}
					document.frm_cart.wb[1].checked=true;
					document.wb2.src="/images/features_27a.png";
					document.wb1.src="/images/features_27.png";
					document.lg2.src="/images/features_27a.png";
					document.lg1.src="/images/features_27.png";
					document.frm_cart.lg[1].checked=true;
					document.getElementById("divLogoPriceY").innerHTML="$0.00";
					document.getElementById("divLogoPriceM").innerHTML="$2.45";
					document.frm_cart.addition_flag2.value=parseInt(document.frm_cart.addition_flag2.value)+1;
					
				}else{
					document.frm_cart.wb[1].checked=false;
					document.wb2.src="/images/features_27.png";
					if(document.frm_cart.addition_flag2.value!=0){
						document.frm_cart.addition_flag2.value=parseInt(document.frm_cart.addition_flag2.value)-1;
					}
					if(document.frm_cart.addition_flag2.value==0 && document.frm_cart.addition_flag.value==0){
							document.lg2.src="/images/features_27.png";
							document.frm_cart.lg[1].checked=false;
							document.getElementById("divLogoPriceY").innerHTML="$24.50";
							document.lg1.src="/images/features_27.png";
							document.frm_cart.lg[0].checked=false;
							document.getElementById("divLogoPriceM").innerHTML="$2.45";
					}
					
					
				}
				
			}
		break;
		case "lg" : 
			if(choice=="m"){
				if(document.frm_cart.lg[0].checked==false){
				document.frm_cart.lg[0].checked=true;
				document.lg1.src="/images/features_27a.png";
				document.lg2.src="/images/features_27.png";
				}else{
					document.frm_cart.lg[0].checked=false;
					document.lg1.src="/images/features_27.png";
					
					
				}
				
			}else
			{
				if(document.frm_cart.lg[1].checked==false){
					document.frm_cart.lg[1].checked=true;
					document.lg2.src="/images/features_27a.png";
					document.lg1.src="/images/features_27.png";
				}else{
					document.frm_cart.lg[1].checked=false;
					document.lg2.src="/images/features_27.png";
				}
				
			}
		break;
		case "br" : 
			if(choice=="m"){
					if(document.frm_cart.br[0].checked==false){
						if(document.frm_cart.br[1].checked==true){
							document.frm_cart.addition_flag2.value=parseInt(document.frm_cart.addition_flag2.value)-1;
						}
						document.frm_cart.br[0].checked=true;
						document.br1.src="/images/features_27a.png";
						document.br2.src="/images/features_27.png";
						document.lg1.src="/images/features_27a.png";
						document.lg2.src="/images/features_27.png";
						document.frm_cart.lg[0].checked=true;
						document.getElementById("divLogoPriceM").innerHTML="$0.00";
						document.getElementById("divLogoPriceY").innerHTML="$24.50";
						document.frm_cart.addition_flag.value=parseInt(document.frm_cart.addition_flag.value)+1;
				}else{
						document.frm_cart.br[0].checked=false;
						document.br1.src="/images/features_27.png";
						if(document.frm_cart.addition_flag.value!=0){
							document.frm_cart.addition_flag.value=parseInt(document.frm_cart.addition_flag.value)-1;
						}
						if(document.frm_cart.addition_flag.value==0 && document.frm_cart.addition_flag2.value==0){
								document.lg2.src="/images/features_27.png";
								document.frm_cart.lg[1].checked=false;
								document.getElementById("divLogoPriceY").innerHTML="$24.50";
								document.lg1.src="/images/features_27.png";
								document.frm_cart.lg[0].checked=false;
								document.getElementById("divLogoPriceM").innerHTML="$2.45";
						}
						
				}
				
			}else
			{
				if(document.frm_cart.br[1].checked==false){
					if(document.frm_cart.br[0].checked==true){
							document.frm_cart.addition_flag.value=parseInt(document.frm_cart.addition_flag.value)-1;
						}
					document.frm_cart.br[1].checked=true;
					document.br2.src="/images/features_27a.png";
					document.br1.src="/images/features_27.png";
					document.lg2.src="/images/features_27a.png";
					document.lg1.src="/images/features_27.png";
					document.frm_cart.lg[1].checked=true;
					document.getElementById("divLogoPriceY").innerHTML="$0.00";
					document.getElementById("divLogoPriceM").innerHTML="$2.45";
					document.frm_cart.addition_flag2.value=parseInt(document.frm_cart.addition_flag2.value)+1;
				}else{
					document.frm_cart.br[1].checked=false;
					document.br2.src="/images/features_27.png";
					if(document.frm_cart.addition_flag2.value!=0){
						document.frm_cart.addition_flag2.value=parseInt(document.frm_cart.addition_flag2.value)-1;
					}
					if(document.frm_cart.addition_flag2.value==0 && document.frm_cart.addition_flag.value==0){
							document.lg2.src="/images/features_27.png";
							document.frm_cart.lg[1].checked=false;
							document.getElementById("divLogoPriceY").innerHTML="$24.50";
							document.lg1.src="/images/features_27.png";
							document.frm_cart.lg[0].checked=false;
							document.getElementById("divLogoPriceM").innerHTML="$2.45";
					}
					
				}
				
			}
		break;
		case "db" : 
			if(choice=="m"){
				if(document.frm_cart.db[0].checked==false){
					if(document.frm_cart.db[1].checked==true){
							document.frm_cart.addition_flag2.value=parseInt(document.frm_cart.addition_flag2.value)-1;
						}
					document.frm_cart.db[0].checked=true;
					document.db1.src="/images/features_27a.png";
					document.db2.src="/images/features_27.png";
					document.lg1.src="/images/features_27a.png";
					document.lg2.src="/images/features_27.png";
					document.frm_cart.lg[0].checked=true;
					document.getElementById("divLogoPriceM").innerHTML="$0.00";
					document.getElementById("divLogoPriceY").innerHTML="$24.50";
					document.frm_cart.addition_flag.value=parseInt(document.frm_cart.addition_flag.value)+1;
				}else{
					document.frm_cart.db[0].checked=false;
					document.db1.src="/images/features_27.png";
					if(document.frm_cart.addition_flag.value!=0){
						document.frm_cart.addition_flag.value=parseInt(document.frm_cart.addition_flag.value)-1;
					}
					if(document.frm_cart.addition_flag.value==0 && document.frm_cart.addition_flag2.value==0){
							document.lg2.src="/images/features_27.png";
							document.frm_cart.lg[1].checked=false;
							document.getElementById("divLogoPriceY").innerHTML="$24.50";
							document.lg1.src="/images/features_27.png";
							document.frm_cart.lg[0].checked=false;
							document.getElementById("divLogoPriceM").innerHTML="$2.45";
					}
					
					
				}
				
			}else
			{
				if(document.frm_cart.db[1].checked==false){
					if(document.frm_cart.db[0].checked==true){
							document.frm_cart.addition_flag.value=parseInt(document.frm_cart.addition_flag.value)-1;
						}
					document.frm_cart.db[1].checked=true;
					document.db2.src="/images/features_27a.png";
					document.db1.src="/images/features_27.png";
					document.lg2.src="/images/features_27a.png";
					document.lg1.src="/images/features_27.png";
					document.frm_cart.lg[1].checked=true;
					document.getElementById("divLogoPriceY").innerHTML="$0.00";
					document.getElementById("divLogoPriceM").innerHTML="$2.45";
					document.frm_cart.addition_flag2.value=parseInt(document.frm_cart.addition_flag2.value)+1;
				}else{
					document.frm_cart.db[1].checked=false;
					document.db2.src="/images/features_27.png";
					if(document.frm_cart.addition_flag2.value!=0){
						document.frm_cart.addition_flag2.value=parseInt(document.frm_cart.addition_flag2.value)-1;
					}
					if(document.frm_cart.addition_flag2.value==0 && document.frm_cart.addition_flag.value==0){
							document.lg2.src="/images/features_27.png";
							document.frm_cart.lg[1].checked=false;
							document.getElementById("divLogoPriceY").innerHTML="$24.50";
							document.lg1.src="/images/features_27.png";
							document.frm_cart.lg[0].checked=false;
							document.getElementById("divLogoPriceM").innerHTML="$2.45";
					}
					
					
				}
				
			}
		break;
		case "pl" : 
			document.frm_cart.gd[1].checked=false;
			document.frm_cart.gd[0].checked=false;
			document.frm_cart.mn[0].checked=false;
			document.frm_cart.mn[1].checked=false;
			document.frm_cart.wb[0].checked=false;
			document.frm_cart.wb[1].checked=false;
			document.frm_cart.lg[0].checked=false;
			document.frm_cart.lg[1].checked=false;
			document.frm_cart.br[0].checked=false;
			document.frm_cart.br[1].checked=false;
			document.frm_cart.db[0].checked=false;
			document.frm_cart.db[1].checked=false;
			
			document.gd1.src="/images/features_27.png";
			document.gd2.src="/images/features_27.png";
			document.mn1.src="/images/features_27.png";
			document.mn2.src="/images/features_27.png";
			document.wb1.src="/images/features_27.png";
			document.wb2.src="/images/features_27.png";
			document.lg1.src="/images/features_27.png";
			document.lg2.src="/images/features_27.png";
			document.br1.src="/images/features_27.png";
			document.br2.src="/images/features_27.png";
			document.db1.src="/images/features_27.png";
			document.db2.src="/images/features_27.png";
			document.pl1.src="/images/features_27.png";
			document.pl2.src="/images/features_27.png";
			document.getElementById("divLogoPriceY").innerHTML="$24.50";
			document.getElementById("divLogoPriceM").innerHTML="$2.45";
			
			if(choice=="m"){
				if(document.frm_cart.pl[0].checked==false){
				document.frm_cart.pl[0].checked=true;
				document.pl1.src="/images/features_27a.png";
				document.pl2.src="/images/features_27.png";
				}else{
					document.frm_cart.pl[0].checked=false;
					document.pl1.src="/images/features_27.png";
					
				}
				
			}else
			{
				if(document.frm_cart.pl[1].checked==false){
					document.frm_cart.pl[1].checked=true;
					document.pl2.src="/images/features_27a.png";
					document.pl1.src="/images/features_27.png";
				}else{
					document.frm_cart.pl[1].checked=false;
					document.pl2.src="/images/features_27.png";
				}
				
			}
		break;
		
	}
	//change next button 
	if(document.frm_cart.gd[0].checked==true){
		document.imgFinish.src="/images/shop_cart_08.jpg";
	}
	else if(document.frm_cart.gd[1].checked==true){
		document.imgFinish.src="/images/shop_cart_08.jpg";
	}
	else if(document.frm_cart.mn[0].checked==true){
		document.imgFinish.src="/images/shop_cart_08.jpg";
	}
	else if(document.frm_cart.mn[1].checked==true){
		document.imgFinish.src="/images/shop_cart_08.jpg";
	}
	else if(document.frm_cart.wb[0].checked==true){
		document.imgFinish.src="/images/shop_cart_08.jpg";
	}
	else if(document.frm_cart.wb[1].checked==true){
		document.imgFinish.src="/images/shop_cart_08.jpg";
	}
	else if(document.frm_cart.lg[0].checked==true){
		document.imgFinish.src="/images/shop_cart_08.jpg";
	}
	else if(document.frm_cart.lg[1].checked==true){
		document.imgFinish.src="/images/shop_cart_08.jpg";
	}
	else if(document.frm_cart.br[0].checked==true){
		document.imgFinish.src="/images/shop_cart_08.jpg";
	}
	else if(document.frm_cart.br[1].checked==true){
		document.imgFinish.src="/images/shop_cart_08.jpg";
	}
	else if(document.frm_cart.db[0].checked==true){
		
		document.imgFinish.src="/images/shop_cart_08.jpg";
	}
	else if(document.frm_cart.db[1].checked==true){
		document.imgFinish.src="/images/shop_cart_08.jpg";
	}
	else if(document.frm_cart.pl[0].checked==true){
		document.imgFinish.src="/images/shop_cart_08.jpg";
	}
	else if(document.frm_cart.pl[1].checked==true){
		document.imgFinish.src="/images/shop_cart_08.jpg";
	}
	else
	{
		document.imgFinish.src="/images/shop_cart_16.jpg";
	}
	if(document.frm_cart.page_name.value=="packages"){   //if the page is new package page, this will function also call from packages.php
		document.imgFinish.src="/images/features_35.jpg";
	}
}
function change_button_preview(id,choice){
	
	switch(id){
		case "gd" : 
			if(choice=="m"){
					if(document.frm_cart.gd[0].checked==true)
						{
							
							document.gd1.src="/images/features_27a.png";
							document.gd2.src="/images/features_27.png";
							document.lg1.src="/images/features_27a.png";
							document.lg2.src="/images/features_27.png";
							document.frm_cart.lg[0].checked=true;
							document.getElementById("divLogoPriceM").innerHTML="$0.00";
							document.getElementById("divLogoPriceY").innerHTML="$24.50";
							document.frm_cart.addition_flag.value=parseInt(document.frm_cart.addition_flag.value)+1;
							
						}
						else
						{
							document.gd1.src="/images/features_27a.png";
							document.gd2.src="/images/features_27.png";
							document.lg1.src="/images/features_27.png";
							document.lg2.src="/images/features_27a.png";
							document.frm_cart.lg[0].checked=false;
							document.getElementById("divLogoPriceM").innerHTML="$2.45";
							if(document.frm_cart.addition_flag.value!=0){
								document.frm_cart.addition_flag.value=parseInt(document.frm_cart.addition_flag.value)-1;
							}
						}
				}
				else
				{
					
					if(document.frm_cart.gd[1].checked==true){
						document.gd1.src="/images/features_27.png";
						document.gd2.src="/images/features_27a.png";
						document.lg2.src="/images/features_27a.png";
						document.lg1.src="/images/features_27.png";
						document.frm_cart.lg[1].checked=true;
						document.getElementById("divLogoPriceY").innerHTML="$0.00";
						document.getElementById("divLogoPriceM").innerHTML="$2.45";
						document.frm_cart.addition_flag2.value=parseInt(document.frm_cart.addition_flag2.value)+1;
					}
				}
		break;
		case "mn" : 
			if(choice=="m"){
					if(document.frm_cart.mn[0].checked==true)
						{
							
							document.mn1.src="/images/features_27a.png";
							document.mn2.src="/images/features_27.png";
							document.lg1.src="/images/features_27a.png";
							document.lg2.src="/images/features_27.png";
							document.frm_cart.lg[0].checked=true;
							document.getElementById("divLogoPriceM").innerHTML="$0.00";
							document.getElementById("divLogoPriceY").innerHTML="$24.50";
							document.frm_cart.addition_flag.value=parseInt(document.frm_cart.addition_flag.value)+1;
						}
						else
						{
							document.mn1.src="/images/features_27a.png";
							document.mn2.src="/images/features_27.png";
							if(document.frm_cart.addition_flag.value==0){
								document.lg1.src="/images/features_27.png";
								document.lg2.src="/images/features_27a.png";
								document.frm_cart.lg[0].checked=false;
								document.getElementById("divLogoPriceM").innerHTML="$2.45";
							}
							if(document.frm_cart.addition_flag.value!=0){
								document.frm_cart.addition_flag.value=parseInt(document.frm_cart.addition_flag.value)-1;
							}
						}
				}
				else
				{
					
					if(document.frm_cart.mn[1].checked==true){
						document.mn1.src="/images/features_27.png";
						document.mn2.src="/images/features_27a.png";
						document.lg2.src="/images/features_27a.png";
						document.lg1.src="/images/features_27.png";
						document.frm_cart.lg[1].checked=true;
						document.getElementById("divLogoPriceY").innerHTML="$0.00";
						document.getElementById("divLogoPriceM").innerHTML="$2.45";
						document.frm_cart.addition_flag2.value=parseInt(document.frm_cart.addition_flag2.value)+1;
					}
				}
		break;
		case "wb" : 
			if(choice=="m"){
					if(document.frm_cart.wb[0].checked==true)
						{
							
							document.wb1.src="/images/features_27a.png";
							document.wb2.src="/images/features_27.png";
							document.lg1.src="/images/features_27a.png";
							document.lg2.src="/images/features_27.png";
							document.frm_cart.lg[0].checked=true;
							document.getElementById("divLogoPriceM").innerHTML="$0.00";
							document.getElementById("divLogoPriceY").innerHTML="$24.50";
							document.frm_cart.addition_flag.value=parseInt(document.frm_cart.addition_flag.value)+1;
						}
						else
						{
							document.wb1.src="/images/features_27a.png";
							document.wb2.src="/images/features_27.png";
							document.lg1.src="/images/features_27.png";
							document.lg2.src="/images/features_27a.png";
							document.frm_cart.lg[0].checked=false;
							document.getElementById("divLogoPriceM").innerHTML="$2.45";
							
							if(document.frm_cart.addition_flag.value!=0){
								document.frm_cart.addition_flag.value=parseInt(document.frm_cart.addition_flag.value)-1;
							}
						}
				}
				else
				{
					
					if(document.frm_cart.wb[1].checked==true){
						document.wb1.src="/images/features_27.png";
						document.wb2.src="/images/features_27a.png";
						document.lg2.src="/images/features_27a.png";
						document.lg1.src="/images/features_27.png";
						document.getElementById("divLogoPriceY").innerHTML="$0.00";
						document.getElementById("divLogoPriceM").innerHTML="$2.45";
						document.frm_cart.lg[1].checked=true;
						document.frm_cart.addition_flag2.value=parseInt(document.frm_cart.addition_flag2.value)+1;
					}
				}
		break;
		case "lg" : 
			if(choice=="m"){
					if(document.frm_cart.lg[0].checked==true)
						{
							
							document.lg1.src="/images/features_27a.png";
							document.lg2.src="/images/features_27.png";
						}
						else
						{
							document.lg1.src="/images/features_27a.png";
							document.lg2.src="/images/features_27.png";
						}
				}
				else
				{
					
					if(document.frm_cart.lg[1].checked==true){
						document.lg1.src="/images/features_27.png";
						document.lg2.src="/images/features_27a.png";
					}
				}
		break;
		case "br" : 
			if(choice=="m"){
					if(document.frm_cart.br[0].checked==true)
						{
							
							document.br1.src="/images/features_27a.png";
							document.br2.src="/images/features_27.png";
							document.lg1.src="/images/features_27a.png";
							document.lg2.src="/images/features_27.png";
							document.frm_cart.lg[0].checked=true;
							document.getElementById("divLogoPriceM").innerHTML="$0.00";
							document.getElementById("divLogoPriceY").innerHTML="$24.50";
							document.frm_cart.addition_flag.value=parseInt(document.frm_cart.addition_flag.value)+1;
						}
						else
						{
							document.br1.src="/images/features_27a.png";
							document.br2.src="/images/features_27.png";
							document.lg1.src="/images/features_27.png";
							document.lg2.src="/images/features_27a.png";
							document.frm_cart.lg[0].checked=false;
							document.getElementById("divLogoPriceM").innerHTML="$2.45";
							if(document.frm_cart.addition_flag.value!=0){
								document.frm_cart.addition_flag.value=parseInt(document.frm_cart.addition_flag.value)-1;
							}
						}
				}
				else
				{
					
					if(document.frm_cart.br[1].checked==true){
						document.br1.src="/images/features_27.png";
						document.br2.src="/images/features_27a.png";
						document.lg2.src="/images/features_27a.png";
						document.lg1.src="/images/features_27.png";
						document.getElementById("divLogoPriceY").innerHTML="$0.00";
						document.getElementById("divLogoPriceM").innerHTML="$2.45";
						document.frm_cart.lg[1].checked=true;
						document.frm_cart.addition_flag2.value=parseInt(document.frm_cart.addition_flag2.value)+1;
					}
				}
		break;
		case "db" : 
			if(choice=="m"){
					if(document.frm_cart.db[0].checked==true)
						{
							
							document.db1.src="/images/features_27a.png";
							document.db2.src="/images/features_27.png";
							document.lg1.src="/images/features_27a.png";
							document.lg2.src="/images/features_27.png";
							document.frm_cart.lg[0].checked=true;
							document.getElementById("divLogoPriceM").innerHTML="$0.00";
							document.getElementById("divLogoPriceY").innerHTML="$24.50";
							document.frm_cart.addition_flag.value=parseInt(document.frm_cart.addition_flag.value)+1;
						}
						else
						{
							document.db1.src="/images/features_27a.png";
							document.db2.src="/images/features_27.png";
							document.lg1.src="/images/features_27.png";
							document.lg2.src="/images/features_27a.png";
							document.getElementById("divLogoPriceM").innerHTML="$2.45";
							document.frm_cart.lg[0].checked=false;
							if(document.frm_cart.addition_flag.value!=0){
								document.frm_cart.addition_flag.value=parseInt(document.frm_cart.addition_flag.value)-1;
							}
						}
				}
				else
				{
					
					if(document.frm_cart.db[1].checked==true){
						document.db1.src="/images/features_27.png";
						document.db2.src="/images/features_27a.png";
						document.lg2.src="/images/features_27a.png";
						document.lg1.src="/images/features_27.png";
						document.getElementById("divLogoPriceY").innerHTML="$0.00";
						document.getElementById("divLogoPriceM").innerHTML="$2.45";
						document.frm_cart.lg[1].checked=true;
						document.frm_cart.addition_flag2.value=parseInt(document.frm_cart.addition_flag2.value)+1;
					}
				}
		break;
		case "pl" : 
			document.frm_cart.gd[1].checked=false;
			document.frm_cart.gd[0].checked=false;
			document.frm_cart.mn[0].checked=false;
			document.frm_cart.mn[1].checked=false;
			document.frm_cart.wb[0].checked=false;
			document.frm_cart.wb[1].checked=false;
			document.frm_cart.lg[0].checked=false;
			document.frm_cart.lg[1].checked=false;
			document.frm_cart.br[0].checked=false;
			document.frm_cart.br[1].checked=false;
			document.frm_cart.db[0].checked=false;
			document.frm_cart.db[1].checked=false;
			document.getElementById("divLogoPriceY").innerHTML="$24.50";
			document.getElementById("divLogoPriceM").innerHTML="$2.45";
			if(choice=="m"){
					if(document.frm_cart.pl[0].checked==true)
						{
							
							document.pl1.src="/images/features_27a.png";
							document.pl2.src="/images/features_27.png";
						}
						else
						{
							document.pl1.src="/images/features_27a.png";
							document.pl2.src="/images/features_27.png";
						}
				}
				else
				{
					
					if(document.frm_cart.pl[1].checked==true){
						document.pl1.src="/images/features_27.png";
						document.pl2.src="/images/features_27a.png";
					}
				}
		break;
		
	}
	
	
	if(document.frm_cart.gd[0].checked==true){
		document.imgFinish.src="/images/shop_cart_08.jpg";
	}
	else if(document.frm_cart.gd[1].checked==true){
		document.imgFinish.src="/images/shop_cart_08.jpg";
	}
	else if(document.frm_cart.mn[0].checked==true){
		document.imgFinish.src="/images/shop_cart_08.jpg";
	}
	else if(document.frm_cart.mn[1].checked==true){
		document.imgFinish.src="/images/shop_cart_08.jpg";
	}
	else if(document.frm_cart.wb[0].checked==true){
		document.imgFinish.src="/images/shop_cart_08.jpg";
	}
	else if(document.frm_cart.wb[1].checked==true){
		document.imgFinish.src="/images/shop_cart_08.jpg";
	}
	else if(document.frm_cart.lg[0].checked==true){
		document.imgFinish.src="/images/shop_cart_08.jpg";
	}
	else if(document.frm_cart.lg[1].checked==true){
		document.imgFinish.src="/images/shop_cart_08.jpg";
	}
	else if(document.frm_cart.br[0].checked==true){
		document.imgFinish.src="/images/shop_cart_08.jpg";
	}
	else if(document.frm_cart.br[1].checked==true){
		document.imgFinish.src="/images/shop_cart_08.jpg";
	}
	else if(document.frm_cart.db[0].checked==true){
		
		document.imgFinish.src="/images/shop_cart_08.jpg";
	}
	else if(document.frm_cart.db[1].checked==true){
		document.imgFinish.src="/images/shop_cart_08.jpg";
	}
	else if(document.frm_cart.pl[0].checked==true){
		document.imgFinish.src="/images/shop_cart_08.jpg";
	}
	else if(document.frm_cart.pl[1].checked==true){
		document.imgFinish.src="/images/shop_cart_08.jpg";
	}
	else
	{
		document.imgFinish.src="/images/shop_cart_16.jpg";
	}	
	if(document.frm_cart.page_name.value=="packages"){   //if the page is new package page, this will function also call from packages.php
		document.imgFinish.src="/images/features_35.jpg";
	}
	
}

function submit_form()
{
	if(document.frm_cart.gd[0].checked==true){
		document.frm_cart.action="view_cart.php?a=s";
	}
	else if(document.frm_cart.gd[1].checked==true){
		document.frm_cart.action="view_cart.php?a=s";
	}
	else if(document.frm_cart.mn[0].checked==true){
		document.frm_cart.action="view_cart.php?a=s";
	}
	else if(document.frm_cart.mn[1].checked==true){
		document.frm_cart.action="view_cart.php?a=s";
	}
	else if(document.frm_cart.wb[0].checked==true){
		document.frm_cart.action="view_cart.php?a=s";
	}
	else if(document.frm_cart.wb[1].checked==true){
		document.frm_cart.action="view_cart.php?a=s";
	}
	else if(document.frm_cart.lg[0].checked==true){
		document.frm_cart.action="view_cart.php?a=s";
	}
	else if(document.frm_cart.lg[1].checked==true){
		document.frm_cart.action="view_cart.php?a=s";
	}
	else if(document.frm_cart.br[0].checked==true){
		document.frm_cart.action="view_cart.php?a=s";
	}
	else if(document.frm_cart.br[1].checked==true){
		document.frm_cart.action="view_cart.php?a=s";
	}
	else if(document.frm_cart.db[0].checked==true){
		
				document.frm_cart.action="view_cart.php?a=s";

	}
	else if(document.frm_cart.db[1].checked==true){
				document.frm_cart.action="view_cart.php?a=s";

	}
	else if(document.frm_cart.pl[0].checked==true){
				document.frm_cart.action="view_cart.php?a=s";

	}
	else if(document.frm_cart.pl[1].checked==true){
				document.frm_cart.action="view_cart.php?a=s";

	}
	else
	{
				//document.frm_cart.action="verify.php";
				document.frm_cart.action="welcome.php";

	}	
	document.frm_cart.submit();
}


function submit_form1()
{
	if(document.frm_cart.gd[0].checked==true){
		document.frm_cart.action="view_cart_test.php?a=s";
	}
	else if(document.frm_cart.gd[1].checked==true){
		document.frm_cart.action="view_cart_test.php?a=s";
	}
	else if(document.frm_cart.mn[0].checked==true){
		document.frm_cart.action="view_cart_test.php?a=s";
	}
	else if(document.frm_cart.mn[1].checked==true){
		document.frm_cart.action="view_cart_test.php?a=s";
	}
	else if(document.frm_cart.wb[0].checked==true){
		document.frm_cart.action="view_cart_test.php?a=s";
	}
	else if(document.frm_cart.wb[1].checked==true){
		document.frm_cart.action="view_cart_test.php?a=s";
	}
	else if(document.frm_cart.lg[0].checked==true){
		document.frm_cart.action="view_cart_test.php?a=s";
	}
	else if(document.frm_cart.lg[1].checked==true){
		document.frm_cart.action="view_cart_test.php?a=s";
	}
	else if(document.frm_cart.br[0].checked==true){
		document.frm_cart.action="view_cart_test.php?a=s";
	}
	else if(document.frm_cart.br[1].checked==true){
		document.frm_cart.action="view_cart_test.php?a=s";
	}
	else if(document.frm_cart.db[0].checked==true){
		
				document.frm_cart.action="view_cart_test.php?a=s";

	}
	else if(document.frm_cart.db[1].checked==true){
				document.frm_cart.action="view_cart_test.php?a=s";

	}
	else if(document.frm_cart.pl[0].checked==true){
				document.frm_cart.action="view_cart_test.php?a=s";

	}
	else if(document.frm_cart.pl[1].checked==true){
				document.frm_cart.action="view_cart_test.php?a=s";

	}
	else
	{
				//document.frm_cart.action="verify.php";
				document.frm_cart.action="welcome.php";

	}	
	document.frm_cart.submit();
}

//function to calculate promotional code
function add_discount_coupon(){
	document.getElementById("divPrmError").innerHTML="<img src='../images/loading1.gif'>";
	var prm_code=document.frm_cart.prm_code.value;
	query="prm_code="+prm_code;
	url="prm_code.php?"+query;
	var temp=new Array();
	http.open("GET", url, true);
	http.onreadystatechange = function() {
	if (http.readyState == 4) {
	if(http.status==200) {
							var results=http.responseText;
							if(results=="Sorry - There are no promotions for your code" || results=="Sorry - There are no promotions for your code"){
								document.getElementById("divPrmError").innerHTML = results;
								
							}
							else{
								document.getElementById("divPrmError").innerHTML="";
								document.getElementById("divTotal").innerHTML=results;
								
								
							}
				
				
			  } 
			}
		};
		http.send(null);

	
}

function add_preview_discount_coupon(){
	document.getElementById("divPrmError").innerHTML="<img src='/images/loading1.gif'>";
	var prm_code=document.frm_cart.prm_code.value;
	query="prm_code="+prm_code;
	url="prm_code.php?"+query;
	var temp=new Array();
	http.open("GET", url, true);
	http.onreadystatechange = function() {
	if (http.readyState == 4) {
	if(http.status==200) {
							var results=http.responseText;
							if(results=="Sorry - There are no promotions for your code" || results=="Sorry - There are no promotions for your code"){
								document.getElementById("divPrmError").innerHTML = results;
								
							}
							else{
								document.getElementById("divPrmError").innerHTML="";
								document.getElementById("divTotal").innerHTML=results;
								
								
							}
				
				
			  } 
			}
		};
		http.send(null);

	
}