var count_time = 25;
var http_request;

function makeHttpRequest(url, callback_function, return_xml)
{
   var http_request = false;
   if (window.XMLHttpRequest) { // Mozilla, Safari,...
       http_request = new XMLHttpRequest();
       if (http_request.overrideMimeType) {
           http_request.overrideMimeType('text/xml');
       }

   } else if (window.ActiveXObject) { // IE
       try {
           http_request = new ActiveXObject("Msxml2.XMLHTTP");
       } catch (e) {
           try {
               http_request = new ActiveXObject("Microsoft.XMLHTTP");
           } catch (e) {}
       }
   }

   if (!http_request) {
       alert('Browser doesn\'t support Ajax');
       return false;
   }
   http_request.onreadystatechange = function() {
       if (http_request.readyState == 4) {
           if (http_request.status == 200) {
               if (return_xml) {
                   eval(callback_function + '(http_request.responseXML)');
               } else {
                   eval(callback_function + '(http_request.responseText)');
               }
           } else {
               //alert('There was a problem with the request.(Code: ' + http_request.status + ')');
			    showad();
				repeat();
           }
       }
   }
   hidead();
   http_request.open('GET', url, true);
   http_request.send(null);
}

function loadXML(xml)
{
	if(xml.getElementsByTagName('content01')){	
		
		var html_content01 = xml.getElementsByTagName('content01').item(0).firstChild.nodeValue;
	}else{
		var html_content01="";
	}
	document.getElementById('html_content').innerHTML = html_content01;
	
}

function load_xml_add_cart(xml)
{
	if(xml.getElementsByTagName('content01')){
		var html_content01 = xml.getElementsByTagName('content01').item(0).firstChild.nodeValue;
	}else{
		var html_content01="";
	}
	if(xml.getElementsByTagName('content02')){
		var html_content02 = xml.getElementsByTagName('content02').item(0).firstChild.nodeValue;
	}else{
		var html_content02="";
	}

	document.getElementById('html_content').innerHTML = html_content01;
	document.getElementById("cart_item").innerHTML = html_content02;	
}


function load_xml_shop_cart(xml)
{
	if(xml.getElementsByTagName('content01')){
		var html_content01 = xml.getElementsByTagName('content01').item(0).firstChild.nodeValue;
	}else{
		var html_content01="";
	}

	if(xml.getElementsByTagName('content02')){
		var html_content02 = xml.getElementsByTagName('content02').item(0).firstChild.nodeValue;
	}else{
		var html_content02="";
	}
	
	if(xml.getElementsByTagName('content03')){
		var html_content03 = xml.getElementsByTagName('content03').item(0).firstChild.nodeValue;
	}else{
		var html_content03="";
	}
	
	if(xml.getElementsByTagName('content04')){
		var html_content04 = xml.getElementsByTagName('content04').item(0).firstChild.nodeValue;
	}else{
		var html_content04="";
	}		
	
	if(xml.getElementsByTagName('content05')){
		var html_content05 = xml.getElementsByTagName('content05').item(0).firstChild.nodeValue;
	}else{
		var html_content05="";
	}	
	
	if(xml.getElementsByTagName('content06')){
		var html_content06 = xml.getElementsByTagName('content06').item(0).firstChild.nodeValue;
	}else{
		var html_content06="";
	}
	
	if(xml.getElementsByTagName('content07')){
		var html_content07 = xml.getElementsByTagName('content07').item(0).firstChild.nodeValue;
	}else{
		var html_content07="";
	}				
	
	if(xml.getElementsByTagName('content08')){
		var html_content08 = xml.getElementsByTagName('content08').item(0).firstChild.nodeValue;
	}else{
		var html_content08="";
	}					
	
	if(xml.getElementsByTagName('content09')){
		var html_content09 = xml.getElementsByTagName('content09').item(0).firstChild.nodeValue;
	}else{
		var html_content09="";
	}					
	
	document.getElementById(html_content03).innerHTML = html_content01;
	document.getElementById(html_content04).innerHTML = html_content02;	
	eval('document.frm.hPrice_'+html_content06+'.value='+html_content05);
	eval('document.frm.hProductId_'+html_content06+'.value='+html_content07);
	document.getElementById(html_content09).innerHTML = html_content08;	
	calculate();
}

function load_xml_shop_size(xml)
{
	if(xml.getElementsByTagName('content01')){
		var html_content01 = xml.getElementsByTagName('content01').item(0).firstChild.nodeValue;
	}else{
		var html_content01="";
	}

	if(xml.getElementsByTagName('content02')){
		var html_content02 = xml.getElementsByTagName('content02').item(0).firstChild.nodeValue;
	}else{
		var html_content02="";
	}
	
	if(xml.getElementsByTagName('content03')){
		var html_content03 = xml.getElementsByTagName('content03').item(0).firstChild.nodeValue;
	}else{
		var html_content03="";
	}	
	
	if(xml.getElementsByTagName('content04')){
		var html_content04 = xml.getElementsByTagName('content04').item(0).firstChild.nodeValue;
	}else{
		var html_content04="";
	}	
	
	if(xml.getElementsByTagName('content05')){
		var html_content05 = xml.getElementsByTagName('content05').item(0).firstChild.nodeValue;
	}else{
		var html_content05="";
	}		
	
	//alert('document.frm.hProductId_'+html_content02+'.value='+html_content05);
	
	eval('document.frm.hPrice_'+html_content02+'.value='+html_content01);
	eval('document.frm.hProductId_'+html_content02+'.value='+html_content05);
	document.getElementById(html_content04).innerHTML = html_content03;	
	calculate();
}

function load_xml_yarn_item(xml)
{
	if(xml.getElementsByTagName('content01')){
		var html_content01 = xml.getElementsByTagName('content01').item(0).firstChild.nodeValue;
	}else{
		var html_content01="";
	}

	if(xml.getElementsByTagName('content02')){
		var html_content02 = xml.getElementsByTagName('content02').item(0).firstChild.nodeValue;
	}else{
		var html_content02="";
	}
	
	if(xml.getElementsByTagName('content03')){
		var html_content03 = xml.getElementsByTagName('content03').item(0).firstChild.nodeValue;
	}else{
		var html_content03="";
	}	
	
	if(xml.getElementsByTagName('content04')){
		var html_content04 = xml.getElementsByTagName('content04').item(0).firstChild.nodeValue;
	}else{
		var html_content04="";
	}		
	//alert('document.frm.hProductId_'+html_content02+'.value='+html_content05);
	
	eval('document.frm.hProductId_'+html_content04+'.value='+html_content03);
	document.getElementById(html_content02).innerHTML = "<img width=55 src='"+html_content01+"'>";	
	calculate();
}


function hidead()
{
	if(document.getElementById("ad2")){
		document.getElementById("ad2").style.backgroundColor="#000000";
	}

	if (document.getElementById)
	{
		document.getElementById("ad2").style.display = "none";
	}
	else if (document.all)
	{
		document.all["ad2"].style.display = "none";
	}
	else if (document.layers)
	{
		document.layers["ad2"].style.display = "none";
	}
	
	if (document.getElementById)
	{
		document.getElementById("html_content").style.display = "none";
	}
	else if (document.all)
	{
		document.all["html_content"].style.display = "none";
	}
	else if (document.layers)
	{
		document.layers["html_content"].style.display = "none";
	}	
}

function showad(val)
{
	window.scroll(0,0);
	if(document.getElementById("ad2")){
		document.getElementById("ad2").style.backgroundColor="#000000";
	}
	makeHttpRequest('ajax_yarn_gallery.php?hId='+val, 'loadXML', true);

	if (document.getElementById)
	{
		document.getElementById("ad2").style.display = "block";
		
	}
	else if (document.all)
	{
		document.all["ad2"].style.display = "block";
	}
	else if (document.layers)
	{
		document.layers["ad2"].style.display = "block";
	}
	
	if (document.getElementById)
	{
		document.getElementById("html_content").style.display = "block";
	}
	else if (document.all)
	{
		document.all["html_content"].style.display = "block";
	}
	else if (document.layers)
	{
		document.layers["html_content"].style.display = "block";
	}	
	
	
}


function showad01(val)
{
	if(navigator.appName == "Netscape"){
		div_location(818,17);
	}else{
		div_location(818,7);
	}
	window.scroll(0,0);
	if(document.getElementById("ad2")){
		document.getElementById("ad2").style.backgroundColor="#000000";
	}	
	
	makeHttpRequest('ajax_gen_trend.php?hTrendId='+val, 'loadXML', true);

	if (document.getElementById)
	{
		document.getElementById("ad2").style.display = "block";
	}
	else if (document.all)
	{
		document.all["ad2"].style.display = "block";
	}
	else if (document.layers)
	{
		document.layers["ad2"].style.display = "block";
	}
	
	if (document.getElementById)
	{
		document.getElementById("html_content").style.display = "block";
	}
	else if (document.all)
	{
		document.all["html_content"].style.display = "block";
	}
	else if (document.layers)
	{
		document.layers["html_content"].style.display = "block";
	}	
	
	
}

function showad011(val)
{
	if(navigator.appName == "Netscape"){
		div_location(818,17);
	}else{
		div_location(818,7);
	}
	window.scroll(0,0);
	if(document.getElementById("ad2")){
		document.getElementById("ad2").style.backgroundColor="#000000";
	}	
	
	makeHttpRequest('ajax_gen_trend01.php?hTrendId='+val, 'loadXML', true);

	if (document.getElementById)
	{
		document.getElementById("ad2").style.display = "block";
	}
	else if (document.all)
	{
		document.all["ad2"].style.display = "block";
	}
	else if (document.layers)
	{
		document.layers["ad2"].style.display = "block";
	}
	
	if (document.getElementById)
	{
		document.getElementById("html_content").style.display = "block";
	}
	else if (document.all)
	{
		document.all["html_content"].style.display = "block";
	}
	else if (document.layers)
	{
		document.layers["html_content"].style.display = "block";
	}	
	
	
}


function showad02(val)
{
	if(navigator.appName == "Netscape"){
		div_location(900,16);
	}else{
		div_location(900,8);
	}
	window.scroll(0,0);
	if(document.getElementById("ad2")){
		document.getElementById("ad2").style.backgroundColor="#000000";
	}	
	
	makeHttpRequest('ajax_gen_catalog.php?hId='+val, 'loadXML', true);

	if (document.getElementById)
	{
		document.getElementById("ad2").style.display = "block";
	}
	else if (document.all)
	{
		document.all["ad2"].style.display = "block";
	}
	else if (document.layers)
	{
		document.layers["ad2"].style.display = "block";
	}
	
	if (document.getElementById)
	{
		document.getElementById("html_content").style.display = "block";
	}
	else if (document.all)
	{
		document.all["html_content"].style.display = "block";
	}
	else if (document.layers)
	{
		document.layers["html_content"].style.display = "block";
	}	
	
	
}

function showad021(val)
{
	if(navigator.appName == "Netscape"){
		div_location(900,16);
	}else{
		div_location(900,8);
	}
	window.scroll(0,0);
	if(document.getElementById("ad2")){
		document.getElementById("ad2").style.backgroundColor="#000000";
	}	
	
	makeHttpRequest('ajax_gen_pattern.php?hId='+val, 'loadXML', true);

	if (document.getElementById)
	{
		document.getElementById("ad2").style.display = "block";
	}
	else if (document.all)
	{
		document.all["ad2"].style.display = "block";
	}
	else if (document.layers)
	{
		document.layers["ad2"].style.display = "block";
	}
	
	if (document.getElementById)
	{
		document.getElementById("html_content").style.display = "block";
	}
	else if (document.all)
	{
		document.all["html_content"].style.display = "block";
	}
	else if (document.layers)
	{
		document.layers["html_content"].style.display = "block";
	}	
	
	
}


function showad03(val)
{
	if(navigator.appName == "Netscape"){
		div_location(818,17);
	}else{
		div_location(818,7);
	}

	window.scroll(0,0);
	if(document.getElementById("ad2")){
		document.getElementById("ad2").style.backgroundColor="#000000";
	}	
	
	makeHttpRequest('ajax_gen_send.php?hRefer='+val, 'loadXML', true);

	if (document.getElementById)
	{
		document.getElementById("ad2").style.display = "block";
	}
	else if (document.all)
	{
		document.all["ad2"].style.display = "block";
	}
	else if (document.layers)
	{
		document.layers["ad2"].style.display = "block";
	}
	
	if (document.getElementById)
	{
		document.getElementById("html_content").style.display = "block";
	}
	else if (document.all)
	{
		document.all["html_content"].style.display = "block";
	}
	else if (document.layers)
	{
		document.layers["html_content"].style.display = "block";
	}	
	
	
}

function showad04(val)
{
	if(navigator.appName == "Netscape"){
		div_location(818,17);
	}else{
		div_location(818,7);
	}

	window.scroll(0,0);
	if(document.getElementById("ad2")){
		document.getElementById("ad2").style.backgroundColor="#000000";
	}	
	
	makeHttpRequest('ajax_howto_gallery.php?hId='+val, 'loadXML', true);

	if (document.getElementById)
	{
		document.getElementById("ad2").style.display = "block";
	}
	else if (document.all)
	{
		document.all["ad2"].style.display = "block";
	}
	else if (document.layers)
	{
		document.layers["ad2"].style.display = "block";
	}
	
	if (document.getElementById)
	{
		document.getElementById("html_content").style.display = "block";
	}
	else if (document.all)
	{
		document.all["html_content"].style.display = "block";
	}
	else if (document.layers)
	{
		document.layers["html_content"].style.display = "block";
	}	
	
	
}

function showad05(val)
{
	if(navigator.appName == "Netscape"){
		div_location(470,0);
	}else{
		div_location(470,0);
	}

	window.scroll(0,0);
	if(document.getElementById("ad2")){
		document.getElementById("ad2").style.backgroundColor="#000000";
	}	
	
	makeHttpRequest('ajax_howto_video.php?hId='+val, 'loadXML', true);

	if (document.getElementById)
	{
		document.getElementById("ad2").style.display = "block";
	}
	else if (document.all)
	{
		document.all["ad2"].style.display = "block";
	}
	else if (document.layers)
	{
		document.layers["ad2"].style.display = "block";
	}
	
	if (document.getElementById)
	{
		document.getElementById("html_content").style.display = "block";
	}
	else if (document.all)
	{
		document.all["html_content"].style.display = "block";
	}
	else if (document.layers)
	{
		document.layers["html_content"].style.display = "block";
	}	
	
	
}


function showad06(val)
{
	if(navigator.appName == "Netscape"){
		div_location(958,0);
	}else{
		div_location(958,0);
	}

	window.scroll(0,0);
	if(document.getElementById("ad2")){
		document.getElementById("ad2").style.backgroundColor="#000000";
	}	
	
	makeHttpRequest('ajax_calendar.php?hSelectDate='+val, 'loadXML', true);

	if (document.getElementById)
	{
		document.getElementById("ad2").style.display = "block";
	}
	else if (document.all)
	{
		document.all["ad2"].style.display = "block";
	}
	else if (document.layers)
	{
		document.layers["ad2"].style.display = "block";
	}
	
	if (document.getElementById)
	{
		document.getElementById("html_content").style.display = "block";
	}
	else if (document.all)
	{
		document.all["html_content"].style.display = "block";
	}
	else if (document.layers)
	{
		document.layers["html_content"].style.display = "block";
	}	
	
	
}


function showad07(val)
{
	if(navigator.appName == "Netscape"){
		div_location(958,0);
	}else{
		div_location(958,0);
	}

	window.scroll(0,0);
	if(document.getElementById("ad2")){
		document.getElementById("ad2").style.backgroundColor="#000000";
	}	
	
	makeHttpRequest('ajax_calendar_month.php?hNow='+val, 'loadXML', true);

	if (document.getElementById)
	{
		document.getElementById("ad2").style.display = "block";
	}
	else if (document.all)
	{
		document.all["ad2"].style.display = "block";
	}
	else if (document.layers)
	{
		document.layers["ad2"].style.display = "block";
	}
	
	if (document.getElementById)
	{
		document.getElementById("html_content").style.display = "block";
	}
	else if (document.all)
	{
		document.all["html_content"].style.display = "block";
	}
	else if (document.layers)
	{
		document.layers["html_content"].style.display = "block";
	}	
	
		
}

function showad08(val)
{

	if(navigator.appName == "Netscape"){
		div_location(958,0);
	}else{
		div_location(958,0);
	}
	window.scroll(0,0);
	if(document.getElementById("ad2")){
		document.getElementById("ad2").style.backgroundColor="#000000";
	}	
	
	makeHttpRequest('ajax_calendar_year.php?hNow='+val, 'loadXML', true);

	if (document.getElementById)
	{
		document.getElementById("ad2").style.display = "block";
	}
	else if (document.all)
	{
		document.all["ad2"].style.display = "block";
	}
	else if (document.layers)
	{
		document.layers["ad2"].style.display = "block";
	}
	
	if (document.getElementById)
	{
		document.getElementById("html_content").style.display = "block";
	}
	else if (document.all)
	{
		document.all["html_content"].style.display = "block";
	}
	else if (document.layers)
	{
		document.layers["html_content"].style.display = "block";
	}	
	
	
}

function showad09(val)
{

	if(navigator.appName == "Netscape"){
		div_location(958,0);
	}else{
		div_location(958,0);
	}
	window.scroll(0,0);
	if(document.getElementById("ad2")){
		document.getElementById("ad2").style.backgroundColor="#000000";
	}	
	
	makeHttpRequest('ajax_calendar_list.php?hNow='+val, 'loadXML', true);

	if (document.getElementById)
	{
		document.getElementById("ad2").style.display = "block";
	}
	else if (document.all)
	{
		document.all["ad2"].style.display = "block";
	}
	else if (document.layers)
	{
		document.layers["ad2"].style.display = "block";
	}
	
	if (document.getElementById)
	{
		document.getElementById("html_content").style.display = "block";
	}
	else if (document.all)
	{
		document.all["html_content"].style.display = "block";
	}
	else if (document.layers)
	{
		document.layers["html_content"].style.display = "block";
	}	
	
	
}


function showad10(val)
{

	if(navigator.appName == "Netscape"){
		div_location(958,0);
	}else{
		div_location(958,0);
	}
	window.scroll(0,0);
	if(document.getElementById("ad2")){
		document.getElementById("ad2").style.backgroundColor="#000000";
	}	
	
	makeHttpRequest('ajax_yarn_retailer.php?hId='+val, 'loadXML', true);

	if (document.getElementById)
	{
		document.getElementById("ad2").style.display = "block";
	}
	else if (document.all)
	{
		document.all["ad2"].style.display = "block";
	}
	else if (document.layers)
	{
		document.layers["ad2"].style.display = "block";
	}
	
	if (document.getElementById)
	{
		document.getElementById("html_content").style.display = "block";
	}
	else if (document.all)
	{
		document.all["html_content"].style.display = "block";
	}
	else if (document.layers)
	{
		document.layers["html_content"].style.display = "block";
	}	
	
	
}


function showad11(val)
{

	if(navigator.appName == "Netscape"){
		div_location(817,17);
	}else{
		div_location(818,17);
	}
	window.scroll(0,0);
	if(document.getElementById("ad2")){
		document.getElementById("ad2").style.backgroundColor="#000000";
	}	
	
	makeHttpRequest('ajax_rettelser.php?hId='+val, 'loadXML', true);

	if (document.getElementById)
	{
		document.getElementById("ad2").style.display = "block";
	}
	else if (document.all)
	{
		document.all["ad2"].style.display = "block";
	}
	else if (document.layers)
	{
		document.layers["ad2"].style.display = "block";
	}
	
	if (document.getElementById)
	{
		document.getElementById("html_content").style.display = "block";
	}
	else if (document.all)
	{
		document.all["html_content"].style.display = "block";
	}
	else if (document.layers)
	{
		document.layers["html_content"].style.display = "block";
	}	
	
	
}




function show_size(val)
{

	if(navigator.appName == "Netscape"){
		div_location(817,17);
	}else{
		div_location(818,17);
	}
	window.scroll(0,0);
	if(document.getElementById("ad2")){
		document.getElementById("ad2").style.backgroundColor="#000000";
	}	
	
	makeHttpRequest('ajax_product_size.php?hId='+val, 'loadXML', true);

	if (document.getElementById)
	{
		document.getElementById("ad2").style.display = "block";
	}
	else if (document.all)
	{
		document.all["ad2"].style.display = "block";
	}
	else if (document.layers)
	{
		document.layers["ad2"].style.display = "block";
	}
	
	if (document.getElementById)
	{
		document.getElementById("html_content").style.display = "block";
	}
	else if (document.all)
	{
		document.all["html_content"].style.display = "block";
	}
	else if (document.layers)
	{
		document.layers["html_content"].style.display = "block";
	}	
	
	
}


function ajax_add_cart(hId,val,count,type)
{

	if(navigator.appName == "Netscape"){
		div_location(470,17);
	}else{
		div_location(470,17);
	}
	window.scroll(0,0);
	if(document.getElementById("ad2")){
		document.getElementById("ad2").style.backgroundColor="#000000";
	}	
	//alert('ajax_add_cart.php?hId='+hId+'&val='+val+'&count='+count+'&type='+type);
	
	makeHttpRequest('ajax_add_cart.php?hId='+hId+'&val='+val+'&count='+count+'&type='+type, 'load_xml_add_cart', true);

	if (document.getElementById)
	{
		document.getElementById("ad2").style.display = "block";
	}
	else if (document.all)
	{
		document.all["ad2"].style.display = "block";
	}
	else if (document.layers)
	{
		document.layers["ad2"].style.display = "block";
	}
	
	if (document.getElementById)
	{
		document.getElementById("html_content").style.display = "block";
	}
	else if (document.all)
	{
		document.all["html_content"].style.display = "block";
	}
	else if (document.layers)
	{
		document.layers["html_content"].style.display = "block";
	}	

	
}


function ajax_add_cart_retailer(hId,val,count,type)
{

	if(navigator.appName == "Netscape"){
		div_location(470,17);
	}else{
		div_location(470,17);
	}
	window.scroll(0,0);
	if(document.getElementById("ad2")){
		document.getElementById("ad2").style.backgroundColor="#000000";
	}	
	//alert('ajax_add_cart.php?hId='+hId+'&val='+val+'&count='+count+'&type='+type);
	
	makeHttpRequest('ajax_add_cart_retailer.php?hId='+hId+'&val='+val+'&count='+count+'&type='+type, 'load_xml_add_cart', true);

	if (document.getElementById)
	{
		document.getElementById("ad2").style.display = "block";
	}
	else if (document.all)
	{
		document.all["ad2"].style.display = "block";
	}
	else if (document.layers)
	{
		document.layers["ad2"].style.display = "block";
	}
	
	if (document.getElementById)
	{
		document.getElementById("html_content").style.display = "block";
	}
	else if (document.all)
	{
		document.all["html_content"].style.display = "block";
	}
	else if (document.layers)
	{
		document.layers["html_content"].style.display = "block";
	}	

	
}





function ajax_add_wishlist(hId,val,count,type)
{

	if(navigator.appName == "Netscape"){
		div_location(470,17);
	}else{
		div_location(470,17);
	}
	window.scroll(0,0);
	if(document.getElementById("ad2")){
		document.getElementById("ad2").style.backgroundColor="#000000";
	}	
	//alert('ajax_add_cart.php?hId='+hId+'&val='+val+'&count='+count+'&type='+type);
		
	makeHttpRequest('ajax_add_wishlist.php?hId='+hId+'&val='+val+'&count='+count+'&type='+type, 'loadXML', true);

	if (document.getElementById)
	{
		document.getElementById("ad2").style.display = "block";
	}
	else if (document.all)
	{
		document.all["ad2"].style.display = "block";
	}
	else if (document.layers)
	{
		document.layers["ad2"].style.display = "block";
	}
	
	if (document.getElementById)
	{
		document.getElementById("html_content").style.display = "block";
	}
	else if (document.all)
	{
		document.all["html_content"].style.display = "block";
	}
	else if (document.layers)
	{
		document.layers["html_content"].style.display = "block";
	}	
	
	
}


function ajax_made_to_order()
{

	if(navigator.appName == "Netscape"){
		div_location(470,17);
	}else{
		div_location(470,17);
	}
	window.scroll(0,0);
	if(document.getElementById("ad2")){
		document.getElementById("ad2").style.backgroundColor="#000000";
	}	
	//alert('ajax_add_cart.php?hId='+hId+'&val='+val+'&count='+count+'&type='+type);
		
	makeHttpRequest('ajax_made_to_order.php', 'loadXML', true);

	if (document.getElementById)
	{
		document.getElementById("ad2").style.display = "block";
	}
	else if (document.all)
	{
		document.all["ad2"].style.display = "block";
	}
	else if (document.layers)
	{
		document.layers["ad2"].style.display = "block";
	}
	
	if (document.getElementById)
	{
		document.getElementById("html_content").style.display = "block";
	}
	else if (document.all)
	{
		document.all["html_content"].style.display = "block";
	}
	else if (document.layers)
	{
		document.layers["html_content"].style.display = "block";
	}	
	
	
}




function ajax_shop_chage_item(color_size_id,color_id,item)
{
	//alert(color_size_id+" "+color_id);
	makeHttpRequest('ajax_shop_change_item.php?hColorSizeId='+color_size_id+'&hColorId='+color_id+'&hItem='+item, 'load_xml_shop_cart', true);
	//calculate();
}

function ajax_shop_chage_size(color_size_id,val,item)
{
	//alert(color_size_id+" "+val+" "+item);
	makeHttpRequest('ajax_shop_change_size.php?hColorSizeId='+color_size_id+'&hVal='+val+'&hItem='+item, 'load_xml_shop_size', true);
	//calculate();
}

function ajax_shop_yarn_item(color_size_id,val,item)
{
	//alert(color_size_id+" "+val+" "+item);
	makeHttpRequest('ajax_shop_yarn_item.php?hColorSizeId='+color_size_id+'&hVal='+val+'&hItem='+item, 'load_xml_yarn_item', true);
	//calculate();
}


function ajax_accessory_chage_item(color_size_id,color_id,item)
{
	//alert(color_size_id+" "+color_id);
	makeHttpRequest('ajax_accessory_change_item.php?hColorSizeId='+color_size_id+'&hColorId='+color_id+'&hItem='+item, 'load_xml_shop_cart', true);
	//calculate();
}

function ajax_accessory_chage_size(color_size_id,val,item)
{
	//alert(color_size_id+" "+val+" "+item);
	makeHttpRequest('ajax_accessory_change_size.php?hColorSizeId='+color_size_id+'&hVal='+val+'&hItem='+item, 'load_xml_shop_size', true);
	//calculate();
}

function ajax_newsletter(email)
{
	
	if(navigator.appName == "Netscape"){
		div_location(726,17);
	}else{
		div_location(726,17);
	}
	window.scroll(0,0);
	if(document.getElementById("ad2")){
		document.getElementById("ad2").style.backgroundColor="#000000";
	}	

	//alert('ajax_newsletter.php?hEmail='+email);
	makeHttpRequest('ajax_newsletter.php?hEmail='+email, 'loadXML', true);
	//calculate();
	
	if (document.getElementById)
	{
		document.getElementById("ad2").style.display = "block";
	}
	else if (document.all)
	{
		document.all["ad2"].style.display = "block";
	}
	else if (document.layers)
	{
		document.layers["ad2"].style.display = "block";
	}
	
	if (document.getElementById)
	{
		document.getElementById("html_content").style.display = "block";
	}
	else if (document.all)
	{
		document.all["html_content"].style.display = "block";
	}
	else if (document.layers)
	{
		document.layers["html_content"].style.display = "block";
	}		
	
}

function div_location(var_x,var_y) { 
w = pageWidth();
h = pageHeight();


   var winl = ((w- var_x) / 2)-var_y;

eval('document.getElementById("html_content").style.top="20px"');
eval('document.getElementById("html_content").style.left="'+winl+'px"');

//alert(winl);
//document.getElementById("html_content").style.top=wint;

 } 		  
 
function pageWidth() {return window.innerWidth != null? window.innerWidth: document.body != null? document.body.clientWidth:null; }
function pageHeight() {return window.innerHeight != null? window.innerHeight: document.body != null? document.body.clientHeight:null;}		

