

/*var init = false;
var init2 = false;
var form_init = true;
var form_mail = true;

try { ajax_init = new XMLHttpRequest(); }
catch(err) { ajax_init = new ActiveXObject("Microsoft.XMLHTTP");}

if(ajax_init == null)
    {
        // window.alert('Ajax Initiaization failed');
    }

*/


var xmlhttp=false;
/*@cc_on @*/
/*@if (@_jscript_version >= 5)
// JScript gives us Conditional compilation, we can cope with old IE versions.
// and security blocked creation of the objects.
 try {
  xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
 } catch (e) {
  try {
   xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
  } catch (E) {
   xmlhttp = false;
  }
 }
@end @*/
if (!xmlhttp && typeof XMLHttpRequest!='undefined') {
	try {
		xmlhttp = new XMLHttpRequest();
	} catch (e) {
		xmlhttp=false;
	}
}
if (!xmlhttp && window.createRequest) {
	try {
		xmlhttp = window.createRequest();
	} catch (e) {
		xmlhttp=false;
	}
}



function main_category1()
{
	var mc1= document.frm1.main_cat1.value;
	var get_string = "get_sub_cat.php?mastercat1=" + mc1;
	xmlhttp.open("POST",get_string,true);
	xmlhttp.send(null);
	xmlhttp.onreadystatechange = function() {
	if(xmlhttp.readyState == 4 || xmlhttp.readyState == "complete")
	{	
		document.getElementById('sub_cat1').innerHTML = xmlhttp.responseText;
	}
	}
	document.getElementById('sub_category1').style.visibility = 'visible';
}

function main_category2()
{
	var mc2= document.frm1.main_cat2.value;
	var get_string = "get_sub_cat.php?mastercat2=" + mc2;
	xmlhttp.open("POST",get_string,true);
	xmlhttp.send(null);
	xmlhttp.onreadystatechange = function() {
	if(xmlhttp.readyState == 4 || xmlhttp.readyState == "complete")
	{	
		document.getElementById('sub_cat2').innerHTML = xmlhttp.responseText;
	}
	}
	document.getElementById('sub_category2').style.visibility = 'visible';
}

function check_name()
{
	var ch_name = document.frm1.p_name.value;	
	var get_string = "get_sub_cat.php?name=" + ch_name;
	xmlhttp.open("POST",get_string,true);
	xmlhttp.send(null);
	xmlhttp.onreadystatechange = function() {
	if(xmlhttp.readyState == 4 || xmlhttp.readyState == "complete")
	{	
		document.getElementById('cname').value = xmlhttp.responseText;
	}
	}
}
	
/*function check_description()
{
	var ch_description = document.frm1.Description.value;
	var get_string = "get_sub_cat.php?ch_description=" + ch_description;
	xmlhttp.open("POST",get_string,true);
	xmlhttp.send(null);
	xmlhttp.onreadystatechange = function() {
	if(xmlhttp.readyState == 4 || xmlhttp.readyState == "complete")
	{	
		document.getElementById('desc').value = xmlhttp.responseText;
	}
	}
}
*/	



