	function reset_config()
	{
		var selected = '';
		if(document.getElementById('form_config'))
		{
			for (var i=0;i<document.form_config.elements.length;i++)
			{
				var e = document.form_config.elements[i];
				if (e.type=='select-one' && e.name.indexOf('pack_')>=0)
				{
					var str = e.name;
					var val_id = str.substring(str.indexOf('_')+1);
					if(document.getElementById('drp_tmp_val'+val_id))
					{
						var opt = document.getElementById('drp_tmp_val'+val_id).value;
						e.options[opt].selected = 'selected';
					}
				}
			}
		}
	}
	function clearText(field_name)
	{
		var str = document.getElementById(field_name).value;
		str = str.toLowerCase();
		if(str.length<3)
		{
			alert("Please choose a domain name with at least 3 characters.");
			document.getElementById(field_name).focus();
			return false;
		}
		
		if(str.substring(0,3)=="www")
		{
			alert("Please Enter Domain name without 'www'. If you want to register with 'www', please contact us.");
			document.getElementById(field_name).focus();
			return false;
		}
		var iChars = " !@#$%^&*()+=[]\\\';,/{}|\":<>?~_"; 
		for (var i = 0; i < str.length; i++) {
			if (iChars.indexOf(str.charAt(i)) != -1) {
			alert ("Requested Domain name '"+str+"' has special characters. \nThese are not allowed.");
			document.getElementById(field_name).focus();
			return false;
			}
		}
	//	sel_main(form_name);
	}

	function sel_main()
	{
		var checked = 0;
		for (var i=0;i<document.form2.elements.length;i++)
		{
			var e = document.form2.elements[i];
			if (e.type=='checkbox')
			{
				if (e.checked == true)
				{
					checked=1;
					break;
				}
			}
		}
		if(checked==0)
		{
			var count=0;
			for (var i=0;i<document.form2.elements.length;i++)
			{
				var e = document.form2.elements[i];
				if (e.type=='checkbox')
				{
					e.checked = true;
					count++;
				}
				if(count==9)
				{
					break;
				}
			}
		}
	}
	
	function reload_me(val)
	{
		setTimeout("window.location.reload(true)",1000);
	}
	function doWhois(domain_name, Loader, Param, year)
	{
		document.getElementById(Param).style.display='block';
		document.getElementById(Param).innerHTML='<center style="background:#DDD;padding-top:2px;"><img src="'+Loader+'" ></center>';
		var xmlhttp=false; //Clear our fetching variable
        try 
		{
                xmlhttp = new ActiveXObject('Msxml2.XMLHTTP'); //Try the first kind of active x object…
        } 
		catch (e) 
		{
			try 
			{
				xmlhttp = new
				ActiveXObject('Microsoft.XMLHTTP'); //Try the second kind of active x object
            } 
			catch (E) 
			{
                xmlhttp = false;
			}
        }
        if (!xmlhttp && typeof XMLHttpRequest!='undefined') 
		{
			xmlhttp = new XMLHttpRequest(); //If we were able to get a working active x object, start an XMLHttpRequest
        }
        file = 'ajax_whois.php?domain='; //This is the path to the file we just finished making *
		chkid=domain_name+"&chkid="+Param+"&"+year;
		xmlhttp.open('GET', file + chkid, true); //Open the file through GET, and add the page we want to retrieve as a GET variable **
		xmlhttp.onreadystatechange=function() 
		{
	        if (xmlhttp.readyState==4) 
			{ //Check if it is ready to recieve data
				var content = xmlhttp.responseText; //The content data which has been retrieved ***
            	if( content )
				{ //Make sure there is something in the content variable
					document.getElementById(Param).innerHTML = content; //Change the inner content of your div to the newly retrieved content ****
        	    }
	        }
		}
        xmlhttp.send(null) //Nullify the XMLHttpRequest
		return;
			
	}

	function ajax_add_cart(domain_name, Ext, id, year)
	{
        var domain = document.getElementById('dom_'+id).value;
        var domainsregperiod = document.getElementById('per_'+id).value;

		document.getElementById(id).innerHTML='<center style="background:#DDD;padding-top:2px;"><img src="chk_loader.gif" ></center>';
		var xmlhttp=false; //Clear our fetching variable
        try 
		{
                xmlhttp = new ActiveXObject('Msxml2.XMLHTTP'); //Try the first kind of active x object…
        } 
		catch (e) 
		{
			try 
			{
				xmlhttp = new
				ActiveXObject('Microsoft.XMLHTTP'); //Try the second kind of active x object
            } 
			catch (E) 
			{
                xmlhttp = false;
			}
        }
        if (!xmlhttp && typeof XMLHttpRequest!='undefined') 
		{
			xmlhttp = new XMLHttpRequest(); //If we were able to get a working active x object, start an XMLHttpRequest
        }
	//	var domain = new array;
		type = 'register'
		file = 'ajax.php'; //This is the path to the file we just finished making *
		if(Ext=='tfr' || Ext=='tfr_bulk')
		{
			type = 'transfer'
		}
		var params = "act=add_domain_name&type="+type+"&domain="+domain+"&domperiod="+domainsregperiod;
		xmlhttp.open('POST', file, true); //Open the file through GET, and add the page we want to retrieve as a GET variable **
	//	alert(params);
		//Send the proper header information along with the request
		xmlhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
		xmlhttp.setRequestHeader("Content-length", params.length);
		xmlhttp.setRequestHeader("Connection", "close");
		xmlhttp.onreadystatechange=function() 
		{
	        if (xmlhttp.readyState==4)
			{ //Check if it is ready to recieve data
				var content = xmlhttp.responseText; //The content data which has been retrieved ***
            	if(content)
				{ //Make sure there is something in the content variable
					privacy(domain);
					if(Ext=='bulk' || Ext=='tfr_bulk')
					{
						year = year+"&bulk=true";
						document.getElementById(id).innerHTML = "<div class='added'><span class='domain'>"+domain+"</span><span class='added_conf'>Domain added to your cart</span><img src='templates/green/images/search_addedrem.png' alt='Remove' title='Remove' style='cursor:pointer;' onclick=\"remove_cart('"+domain+"','chk_loader.gif','"+id+"','"+year+"')\" /></div>";
					}
					else
					{
						var exten = domain.substring(domain.indexOf('.'));
						document.getElementById(id).innerHTML = "<div class='added'><span>"+exten+"</span><div class='added_text'>Domain added to your cart</div><img src='templates/green/images/search_addedrem.png' alt='Remove' title='Remove' style='cursor:pointer;' onclick=\"remove_cart('"+domain+"','chk_loader.gif','"+id+"','"+year+"')\" /></div>";
					}
					ShowCart('smallCart');
					UpdateCartItems();
        	    }
	//			return false;
	        }
		}
        xmlhttp.send(params) //Nullify the XMLHttpRequest
		return;
	}
	function cart_login(val)
	{
		if(val=='1')
		{
			//document.getElementById("error_msg_top").innerHTML = '&nbsp;';
		}
		else
		{
			document.getElementById("error_msg").innerHTML = '';
		}
		var xmlhttp=false; //Clear our fetching variable
        try 
		{
                xmlhttp = new ActiveXObject('Msxml2.XMLHTTP'); //Try the first kind of active x object…
        } 
		catch (e) 
		{
			try 
			{
				xmlhttp = new
				ActiveXObject('Microsoft.XMLHTTP'); //Try the second kind of active x object
            } 
			catch (E) 
			{
                xmlhttp = false;
			}
        }
        if (!xmlhttp && typeof XMLHttpRequest!='undefined') 
		{
			xmlhttp = new XMLHttpRequest(); //If we were able to get a working active x object, start an XMLHttpRequest
        }
		if(val=='1')
		{
			username = document.getElementById('top_username').value;
			pass = document.getElementById('top_pass').value;
		}
		else
		{
			username = document.getElementById('username').value;
			pass = document.getElementById('pass_cart').value;
		}
	//	var domain = new array;
		var params = "act=login&username="+username+"&pass="+pass;
		file = 'ajax.php'; //This is the path to the file we just finished making *
		xmlhttp.open('POST', file, true); //Open the file through GET, and add the page we want to retrieve as a GET variable **
	//	alert(params);
		//Send the proper header information along with the request
		xmlhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
		xmlhttp.setRequestHeader("Content-length", params.length);
		xmlhttp.setRequestHeader("Connection", "close");
		xmlhttp.onreadystatechange=function() 
		{
	        if (xmlhttp.readyState==4)
			{ //Check if it is ready to recieve data
				var content = xmlhttp.responseText; //The content data which has been retrieved ***
            	if(content=="success")
				{
					if(val=='1')
						document.getElementById('frmlogin').submit();
					else
						document.getElementById('cart_login_frm').submit();
				}
				else
				{
					if(val=='1')
						document.getElementById("error_msg_top").innerHTML = "<font color='#CC0000'><strong>"+content+"</strong></font>";
					else
						document.getElementById("error_msg").innerHTML = content;
				}
	//			return false;
	        }
		}
        xmlhttp.send(params) //Nullify the XMLHttpRequest
		return;
	}

/*	function ajax_add_cart(domain_name, Ext, id, year)
	{
		var xmlhttp=false; //Clear our fetching variable
        try 
		{
                xmlhttp = new ActiveXObject('Msxml2.XMLHTTP'); //Try the first kind of active x object…
        } 
		catch (e) 
		{
			try 
			{
				xmlhttp = new
				ActiveXObject('Microsoft.XMLHTTP'); //Try the second kind of active x object
            } 
			catch (E) 
			{
                xmlhttp = false;
			}
        }
        if (!xmlhttp && typeof XMLHttpRequest!='undefined') 
		{
			xmlhttp = new XMLHttpRequest(); //If we were able to get a working active x object, start an XMLHttpRequest
        }
	//	var domain = new array;
        var domain = document.getElementById('dom_'+id).value;
        var domainsregperiod = document.getElementById('per_'+id).value;

		var params = "domains[]="+domain+"&domainsregperiod["+domain+"]="+domainsregperiod;
		file = 'cart.php?a=add&domain=register'; //This is the path to the file we just finished making *
		if(Ext=='tfr' || Ext=='tfr_bulk')
		{
			file = 'cart.php?a=add&domain=transfer'; //This is the path to the file we just finished making *
		}
		xmlhttp.open('POST', file, true); //Open the file through GET, and add the page we want to retrieve as a GET variable **
	//	alert(params);
		//Send the proper header information along with the request
		xmlhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
		xmlhttp.setRequestHeader("Content-length", params.length);
		xmlhttp.setRequestHeader("Connection", "close");
		xmlhttp.onreadystatechange=function() 
		{
	        if (xmlhttp.readyState==4)
			{ //Check if it is ready to recieve data
				var content = xmlhttp.responseText; //The content data which has been retrieved ***
            	if(content)
				{ //Make sure there is something in the content variable
					privacy(domain);
					if(Ext=='bulk' || Ext=='tfr_bulk')
					{
						year = year+"&bulk=true";
						document.getElementById(id).innerHTML = "<div class='added'><span class='domain'>"+domain+"</span><span class='added_conf'>Domain added to your cart</span><img src='templates/green/images/search_addedrem.png' alt='Check' style='cursor:pointer;' onclick=remove_cart('"+domain+"','chk_loader.gif','"+id+"','"+year+"') /></div>";
					}
					else
					{
						document.getElementById(id).innerHTML = "<div class='added'><span>"+Ext+"</span><div class='added_text'>Domain added to your cart</div><img src='templates/green/images/search_addedrem.png' alt='Check' style='cursor:pointer;' onclick=remove_cart('"+domain+"','chk_loader.gif','"+id+"','"+year+"') /></div>";
					}
					ShowCart('smallCart');
        	    }
	//			return false;
	        }
		}
        xmlhttp.send(params) //Nullify the XMLHttpRequest
		return;
	}
*/	
	/*function privacy(domain)
	{
		// using same function in config so remove one when create JS file
		var act = 'add_privacy';
		if(document.getElementById(domain))
		{
			act = document.getElementById(domain).value;
		}
		var xmlhttp=false; //Clear our fetching variable
		try 
		{
				xmlhttp = new ActiveXObject('Msxml2.XMLHTTP'); //Try the first kind of active x object…
		} 
		catch (e) 
		{
			try 
			{
				xmlhttp = new
				ActiveXObject('Microsoft.XMLHTTP'); //Try the second kind of active x object
			} 
			catch (E) 
			{
				xmlhttp = false;
			}
		}
		if (!xmlhttp && typeof XMLHttpRequest!='undefined') 
		{
			xmlhttp = new XMLHttpRequest(); //If we were able to get a working active x object, start an XMLHttpRequest
		}
	//	var domain = new array;
		var params = "act="+act+"&domain="+domain;
		file = 'ajax.php?'+params; //This is the path to the file we just finished making *
		xmlhttp.open('POST', file, true); //Open the file through GET, and add the page we want to retrieve as a GET variable **
	//	alert(params);
		//Send the proper header information along with the request
		xmlhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
		xmlhttp.setRequestHeader("Content-length", params.length);
		xmlhttp.setRequestHeader("Connection", "close");
		xmlhttp.onreadystatechange=function() 
		{
			if (xmlhttp.readyState==4)
			{ //Check if it is ready to recieve data
				var content = xmlhttp.responseText; //The content data which has been retrieved ***
				//document.getElementById(id).innerHTML = content;
	//			return false;
			}
		}
		xmlhttp.send(params) //Nullify the XMLHttpRequest
		return;
	}*/

	function remove_cart(domain, Loader, id, year)
	{
		var xmlhttp=false; //Clear our fetching variable
        try 
		{
                xmlhttp = new ActiveXObject('Msxml2.XMLHTTP'); //Try the first kind of active x object…
        } 
		catch (e) 
		{
			try 
			{
				xmlhttp = new
				ActiveXObject('Microsoft.XMLHTTP'); //Try the second kind of active x object
            } 
			catch (E) 
			{
                xmlhttp = false;
			}
        }
        if (!xmlhttp && typeof XMLHttpRequest!='undefined') 
		{
			xmlhttp = new XMLHttpRequest(); //If we were able to get a working active x object, start an XMLHttpRequest
        }
	//	var domain = new array;
		var params = "act=rem&domain="+domain;
		file = 'ajax.php?act=rem&domain='+domain; //This is the path to the file we just finished making *
		xmlhttp.open('POST', file, true); //Open the file through GET, and add the page we want to retrieve as a GET variable **
	//	alert(params);
		//Send the proper header information along with the request
		xmlhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
		xmlhttp.setRequestHeader("Content-length", params.length);
		xmlhttp.setRequestHeader("Connection", "close");
		xmlhttp.onreadystatechange=function() 
		{
	        if (xmlhttp.readyState==4)
			{ //Check if it is ready to recieve data
				var content = xmlhttp.responseText; //The content data which has been retrieved ***
            	//document.getElementById(id).innerHTML = content;
				doWhois(domain, Loader, id, year);
				ShowCart('smallCart');
				UpdateCartItems();
	//			return false;
	        }
		}
        xmlhttp.send(params) //Nullify the XMLHttpRequest
		return;
	}

	function bulkDomain()
	{
	//	document.getElementById(Param).innerHTML='<img src="'+Loader+'" >';
		var xmlhttp=false; //Clear our fetching variable
        try 
		{
                xmlhttp = new ActiveXObject('Msxml2.XMLHTTP'); //Try the first kind of active x object…
        } 
		catch (e) 
		{
			try 
			{
				xmlhttp = new
				ActiveXObject('Microsoft.XMLHTTP'); //Try the second kind of active x object
            } 
			catch (E) 
			{
                xmlhttp = false;
			}
        }
        if (!xmlhttp && typeof XMLHttpRequest!='undefined') 
		{
			xmlhttp = new XMLHttpRequest(); //If we were able to get a working active x object, start an XMLHttpRequest
        }
        file = 'ajax.php'; //This is the path to the file we just finished making *
		chkid="?act=bulkDomPage";
		xmlhttp.open('GET', file + chkid, true); //Open the file through GET, and add the page we want to retrieve as a GET variable **
		xmlhttp.onreadystatechange=function() 
		{
	        if (xmlhttp.readyState==4) 
			{ //Check if it is ready to recieve data
				var content = xmlhttp.responseText; //The content data which has been retrieved ***
            	if( content )
				{ //Make sure there is something in the content variable
					window.location = "domainchecker.php"; //Change the inner content of your div to the newly retrieved content ****
        	    }
	        }
		}
        xmlhttp.send(null) //Nullify the XMLHttpRequest
		return;
			
	}

function Sel_Package(domain, pack, id)
{
	document.getElementById('pack_'+id).value = pack;
	var page = pack;
	if(page != 'Domain')
	{
		var wdth = 430;
		if(page == 'Email')
		{
			wdth = 310;
		}
		freeze_out(page+'.htm', domain, id, wdth);
	}
	else
	{
		remove_product(domain, id, "remove_config");
	}
}
function remove_product(domain, id, param)
{
	var xmlhttp=false; //Clear our fetching variable
	try 
	{
			xmlhttp = new ActiveXObject('Msxml2.XMLHTTP'); //Try the first kind of active x object…
	} 
	catch (e) 
	{
		try 
		{
			xmlhttp = new
			ActiveXObject('Microsoft.XMLHTTP'); //Try the second kind of active x object
		} 
		catch (E) 
		{
			xmlhttp = false;
		}
	}
	if (!xmlhttp && typeof XMLHttpRequest!='undefined') 
	{
		xmlhttp = new XMLHttpRequest(); //If we were able to get a working active x object, start an XMLHttpRequest
	}
	file = 'ajax.php'; //This is the path to the file we just finished making *
	chkid="?act="+param+"&domain="+domain;
	xmlhttp.open('GET', file + chkid, true); //Open the file through GET, and add the page we want to retrieve as a GET variable **
	xmlhttp.onreadystatechange=function() 
	{
		if (xmlhttp.readyState==4) 
		{ //Check if it is ready to recieve data
			var content = xmlhttp.responseText; //The content data which has been retrieved ***
			if( content )
			{ //Make sure there is something in the content variable
				if(document.getElementById('hst_'+id))
				{
					document.getElementById('hst_'+id).innerHTML = ''; //Change the inner content of your div to the newly retrieved content ****
					document.getElementById('hst_'+id).style.display = 'none';
				}
				if(param != "remove_config")
				{
					document.getElementById('dom_'+id).innerHTML = ''; //Change the inner content of your div to the newly retrieved content ****
					document.getElementById('dom_'+id).style.display = 'none';
						if(document.getElementById('btns_'+id))
						{
							document.getElementById('btns_'+id).style.display = 'none';
						}
						if(document.getElementById('head_'+id))
						{
							document.getElementById('head_'+id).style.display = 'none';
						}
				}
				if(param == "remove_config")
				{
				//	document.getElementById('pack_'+id).options[0].selected = 'selected'; //Change the inner content of your div to the newly retrieved content ****
					Domain_Terms('', domain, id);
					if(document.getElementById('btns_'+id))
					{
							document.getElementById('btns_'+id).style.display = 'block';
					}
				}
				if(document.getElementById('drp_tmp_val'+id))
				{
					document.getElementById('drp_tmp_val'+id).value=0
				}
				reset_config();
				ShowCart('smallCart');
			}
		}
	}
	xmlhttp.send(null) //Nullify the XMLHttpRequest
	return;
}

function Pack_Selected_1()
{
	var pack = document.getElementsByName('package');
	var val = '';
	for (var i=0; i< pack.length; i++)
	{ 
		if (pack[i].checked)
		{
			val = pack[i].value;
			un_freeze();
			break;
		} 
	}
	if (val!='')
	{
		//document.getElementById(Param).innerHTML='<img src="'+Loader+'" >';
		domain = document.getElementById('config_domain').value;
		var xmlhttp=false; //Clear our fetching variable
        try 
		{
                xmlhttp = new ActiveXObject('Msxml2.XMLHTTP'); //Try the first kind of active x object…
        } 
		catch (e) 
		{
			try 
			{
				xmlhttp = new
				ActiveXObject('Microsoft.XMLHTTP'); //Try the second kind of active x object
            } 
			catch (E) 
			{
                xmlhttp = false;
			}
        }
        if (!xmlhttp && typeof XMLHttpRequest!='undefined') 
		{
			xmlhttp = new XMLHttpRequest(); //If we were able to get a working active x object, start an XMLHttpRequest
        }
	//	var params = "domainoption[]=incart&incartdomain="+domain;
		file = 'ajax.php?a=add&pid='+val; //This is the path to the file we just finished making *
		xmlhttp.open('GET', file, true); //Open the file through GET, and add the page we want to retrieve as a GET variable **
		xmlhttp.onreadystatechange=function() 
		{
	        if (xmlhttp.readyState==4) 
			{ //Check if it is ready to recieve data
				var content = xmlhttp.responseText; //The content data which has been retrieved ***
            	if( content )
				{ //Make sure there is something in the content variable
					Pack_Selected_1(val);
					//document.getElementById('my_output').innerHTML=content; //Change the inner content of your div to the newly retrieved content ****
				//	Pack_Selected_1(val); //Change the inner content of your div to the newly retrieved content ****
        	    }
	        }
		}
        xmlhttp.send(null) //Nullify the XMLHttpRequest
		return;
	}
}


function Update_Package(domain, pack, id)
{
	document.getElementById('config_domain').value = domain;
	document.getElementById('config_id').value = id;
	Pack_Selected(pack);
}

function show_buttons(id)
{
	if(document.getElementById('btns_'+id))
	{
		document.getElementById('btns_'+id).style.display = 'block';
	}
}
function Pack_Selected(val)
{
	/*var val = '';
	for (var i=0; i< pack.length; i++)
	{ 
		if (pack[i].checked)
		{
			val = pack[i].value;
			un_freeze();
			break;
		} 
	}*/
	if (val!='')
	{
		//document.getElementById(Param).innerHTML='<img src="'+Loader+'" >';
		domain = document.getElementById('config_domain').value;
		Div_id = document.getElementById('config_id').value;
		var btn_pack = document.getElementById('pack_'+Div_id).value;
		if(document.getElementById('drp_tmp_val'+Div_id))
			document.getElementById('drp_tmp_val'+Div_id).value = document.getElementById('pack_'+Div_id).value;
		un_freeze();
		var xmlhttp=false; //Clear our fetching variable
        try 
		{
                xmlhttp = new ActiveXObject('Msxml2.XMLHTTP'); //Try the first kind of active x object…
        } 
		catch (e) 
		{
			try 
			{
				xmlhttp = new
				ActiveXObject('Microsoft.XMLHTTP'); //Try the second kind of active x object
            } 
			catch (E) 
			{
                xmlhttp = false;
			}
        }
        if (!xmlhttp && typeof XMLHttpRequest!='undefined') 
		{
			xmlhttp = new XMLHttpRequest(); //If we were able to get a working active x object, start an XMLHttpRequest
        }
	//	var domain = new array;
		var params = "act=add&val="+val+"&domain="+domain+"&id="+Div_id;
		file = 'ajax.php'; //This is the path to the file we just finished making *
		xmlhttp.open('POST', file, true); //Open the file through GET, and add the page we want to retrieve as a GET variable **
//		alert(params);
		//Send the proper header information along with the request
		xmlhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
		xmlhttp.setRequestHeader("Content-length", params.length);
		xmlhttp.setRequestHeader("Connection", "close");
		xmlhttp.onreadystatechange=function() 
		{
	        if (xmlhttp.readyState==4)
			{ //Check if it is ready to recieve data
				var content = xmlhttp.responseText; //The content data which has been retrieved ***
            	if(content)
				{ //Make sure there is something in the content variable
					//alert('hosting added');
					//Pack_Selected_2();//
					document.getElementById('hst_'+Div_id).innerHTML=content; //Change the inner content of your div to the newly retrieved content ****
					document.getElementById('hst_'+Div_id).style.display = 'block';
					if(document.getElementById('btns_'+Div_id))
					{
						document.getElementById('btns_'+Div_id).style.display = 'none';
					}
					/*if(btn_pack=='Email')
					{
						document.getElementById('btns_Email'+Div_id).style.display = 'none';
						document.getElementById('btns_Hosting'+Div_id).style.display = 'block';
					}
					else
					{
						document.getElementById('btns_Email'+Div_id).style.display = 'block';
						document.getElementById('btns_Hosting'+Div_id).style.display = 'none';
					}*/
					Domain_Terms(val, domain, Div_id);
					reset_config();
					ShowCart('smallCart');
        	    }
	        }
		}
        xmlhttp.send(params) //Nullify the XMLHttpRequest
		return;
	}
}

function Domain_Terms(pack, domain, Div_id)
{
	//document.getElementById(Param).innerHTML='<img src="'+Loader+'" >';
	var xmlhttp=false; //Clear our fetching variable
	try 
	{
			xmlhttp = new ActiveXObject('Msxml2.XMLHTTP'); //Try the first kind of active x object…
	} 
	catch (e) 
	{
		try 
		{
			xmlhttp = new
			ActiveXObject('Microsoft.XMLHTTP'); //Try the second kind of active x object
		} 
		catch (E) 
		{
			xmlhttp = false;
		}
	}
	if (!xmlhttp && typeof XMLHttpRequest!='undefined') 
	{
		xmlhttp = new XMLHttpRequest(); //If we were able to get a working active x object, start an XMLHttpRequest
	}
//	var domain = new array;
	var params = "act=domain_terms&val="+pack+"&domain="+domain+"&id="+Div_id;
//	alert(params);
	file = 'ajax.php'; //This is the path to the file we just finished making *
	xmlhttp.open('POST', file, true); //Open the file through GET, and add the page we want to retrieve as a GET variable **
//	alert(params);
	//Send the proper header information along with the request
	xmlhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
	xmlhttp.setRequestHeader("Content-length", params.length);
	xmlhttp.setRequestHeader("Connection", "close");
	xmlhttp.onreadystatechange=function() 
	{
		if (xmlhttp.readyState==4)
		{ //Check if it is ready to recieve data
			var content = xmlhttp.responseText; //The content data which has been retrieved ***
			if(content)
			{ //Make sure there is something in the content variable
				document.getElementById('domain_terms_'+Div_id).innerHTML=content; //Change the inner content of your div to the newly retrieved content ****
			}
		}
	}
	xmlhttp.send(params) //Nullify the XMLHttpRequest
	return;
}

	function ShowCart(divId)
	{
	//	document.getElementById(Param).innerHTML='<img src="'+Loader+'" >';
		var xmlhttp=false; //Clear our fetching variable
        try 
		{
                xmlhttp = new ActiveXObject('Msxml2.XMLHTTP'); //Try the first kind of active x object…
        } 
		catch (e) 
		{
			try 
			{
				xmlhttp = new
				ActiveXObject('Microsoft.XMLHTTP'); //Try the second kind of active x object
            } 
			catch (E) 
			{
                xmlhttp = false;
			}
        }
        if (!xmlhttp && typeof XMLHttpRequest!='undefined') 
		{
			xmlhttp = new XMLHttpRequest(); //If we were able to get a working active x object, start an XMLHttpRequest
        }
        file = 'ajax.php'; //This is the path to the file we just finished making *
		chkid="?act=show";
		xmlhttp.open('GET', file + chkid, true); //Open the file through GET, and add the page we want to retrieve as a GET variable **
		xmlhttp.onreadystatechange=function() 
		{
	        if (xmlhttp.readyState==4) 
			{ //Check if it is ready to recieve data
				var content = xmlhttp.responseText; //The content data which has been retrieved ***
            	if( content )
				{ //Make sure there is something in the content variable
					if(document.getElementById(divId))
						document.getElementById(divId).innerHTML = content; //Change the inner content of your div to the newly retrieved content ****
        	    }
	        }
		}
        xmlhttp.send(null) //Nullify the XMLHttpRequest
		return;
			
	}
	
	function privacy(domain)
	{
		// using same function in checker.php so remove one when create JS file
		var act = 'add_privacy';
		if(document.getElementById(domain))
		{
			if(document.getElementById(domain).checked == false)
				act = 'rem_privacy';
		}
		var xmlhttp=false; //Clear our fetching variable
		try 
		{
				xmlhttp = new ActiveXObject('Msxml2.XMLHTTP'); //Try the first kind of active x object…
		} 
		catch (e) 
		{
			try 
			{
				xmlhttp = new
				ActiveXObject('Microsoft.XMLHTTP'); //Try the second kind of active x object
			} 
			catch (E) 
			{
				xmlhttp = false;
			}
		}
		if (!xmlhttp && typeof XMLHttpRequest!='undefined') 
		{
			xmlhttp = new XMLHttpRequest(); //If we were able to get a working active x object, start an XMLHttpRequest
		}
	//	var domain = new array;
		var params = "act="+act+"&domain="+domain;
		file = 'ajax.php?'+params; //This is the path to the file we just finished making *
		xmlhttp.open('POST', file, true); //Open the file through GET, and add the page we want to retrieve as a GET variable **
	//	alert(params);
		//Send the proper header information along with the request
		xmlhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
		xmlhttp.setRequestHeader("Content-length", params.length);
		xmlhttp.setRequestHeader("Connection", "close");
		xmlhttp.onreadystatechange=function() 
		{
			if (xmlhttp.readyState==4)
			{ //Check if it is ready to recieve data
				var content = xmlhttp.responseText; //The content data which has been retrieved ***
				ShowCart('smallCart');
				//document.getElementById(id).innerHTML = content;
	//			return false;
			}
		}
		xmlhttp.send(params) //Nullify the XMLHttpRequest
		return;
	}

	function domain_period(domain, period)
	{
		// using same function in checker.php so remove one when create JS file
		var act = 'domain_updown';
		var xmlhttp=false; //Clear our fetching variable
		try 
		{
				xmlhttp = new ActiveXObject('Msxml2.XMLHTTP'); //Try the first kind of active x object…
		} 
		catch (e) 
		{
			try 
			{
				xmlhttp = new
				ActiveXObject('Microsoft.XMLHTTP'); //Try the second kind of active x object
			} 
			catch (E) 
			{
				xmlhttp = false;
			}
		}
		if (!xmlhttp && typeof XMLHttpRequest!='undefined') 
		{
			xmlhttp = new XMLHttpRequest(); //If we were able to get a working active x object, start an XMLHttpRequest
		}
	//	var domain = new array;
		var params = "act="+act+"&domain="+domain+"&period="+period;
		file = 'ajax.php?'+params; //This is the path to the file we just finished making *
		xmlhttp.open('POST', file, true); //Open the file through GET, and add the page we want to retrieve as a GET variable **
	//	alert(params);
		//Send the proper header information along with the request
		xmlhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
		xmlhttp.setRequestHeader("Content-length", params.length);
		xmlhttp.setRequestHeader("Connection", "close");
		xmlhttp.onreadystatechange=function() 
		{
			if (xmlhttp.readyState==4)
			{ //Check if it is ready to recieve data
				var content = xmlhttp.responseText; //The content data which has been retrieved ***
				ShowCart('smallCart');
				//document.getElementById(id).innerHTML = content;
	//			return false;
			}
		}
		xmlhttp.send(params) //Nullify the XMLHttpRequest
		return;
	}

	function hide_it(divId)
	{
		if(document.getElementById(divId))
		{
			document.getElementById(divId).style.display = 'none';
		}
	}
	
	function UpdateCartItems()
	{
	//	document.getElementById(Param).innerHTML='<img src="'+Loader+'" >';
		if(document.getElementById('my_items_in_cart'))
		{
			var xmlhttp=false; //Clear our fetching variable
			try 
			{
					xmlhttp = new ActiveXObject('Msxml2.XMLHTTP'); //Try the first kind of active x object…
			} 
			catch (e) 
			{
				try 
				{
					xmlhttp = new
					ActiveXObject('Microsoft.XMLHTTP'); //Try the second kind of active x object
				} 
				catch (E) 
				{
					xmlhttp = false;
				}
			}
			if (!xmlhttp && typeof XMLHttpRequest!='undefined') 
			{
				xmlhttp = new XMLHttpRequest(); //If we were able to get a working active x object, start an XMLHttpRequest
			}
			file = 'ajax.php'; //This is the path to the file we just finished making *
			chkid="?act=total_cart";
			xmlhttp.open('GET', file + chkid, true); //Open the file through GET, and add the page we want to retrieve as a GET variable **
			xmlhttp.onreadystatechange=function() 
			{
				if (xmlhttp.readyState==4) 
				{ //Check if it is ready to recieve data
					var content = xmlhttp.responseText; //The content data which has been retrieved ***
					if( content )
					{ //Make sure there is something in the content variable
						document.getElementById('my_items_in_cart').value = content; //Change the inner content of your div to the newly retrieved content ****
					}
				}
			}
			xmlhttp.send(null) //Nullify the XMLHttpRequest
			return;
		}
	}
