// JavaScript Document
function sample(a)
{	

	alert('its working');
}
function callPopup1()
{
	popup('popUpDiv');
}
function callPopup2()
{
	popup1('popUpDiv1');
}

function GetXmlHttpObject()
{
	objXMLHttp = false;
	try
	{
		objXMLHttp = new ActiveXObject("Msxml2.XMLHTTP");
	}
	catch (e)
	{
		try
		{
			objXMLHttp = new ActiveXObject("Microsoft.XMLHTTP");
		}
		catch (e)
		{
			objXMLHttp = false;
		}
	}
	if (!objXMLHttp && typeof XMLHttpRequest != 'undefined')
		objXMLHttp = new XMLHttpRequest();
	return objXMLHttp;
}

function callAjax(urlpath)
{
//document.getElementById('testing4').innerHTML= '';

document.getElementById('ajaxloadcontent').innerHTML= '';
	xmlHttp=GetXmlHttpObject()
	if (xmlHttp==null)
	{
		alert ("Browser does not support HTTP Request")
		return
	}
	// Create a function that will receive data sent from the server
	xmlHttp.onreadystatechange = function(){
		if(xmlHttp.readyState == 4){
			document.getElementById('ajaxloadcontent').innerHTML= xmlHttp.responseText;
			//	loadPatterns(urlpath);

		}
	}
	xmlHttp.open("GET", urlpath, true);
	xmlHttp.send(null);

}

function callAjax1(urlpath)
{
	//document.getElementById('testing4').innerHTML= '';
document.getElementById('ajxcontent').innerHTML= '';
	xmlHttp=GetXmlHttpObject()
	if (xmlHttp==null)
	{
		alert ("Browser does not support HTTP Request")
		return
	}
	// Create a function that will receive data sent from the server
	xmlHttp.onreadystatechange = function(){
		if(xmlHttp.readyState == 4){
		//	alert(xmlHttp.responseText);
			document.getElementById('ajxcontent').innerHTML= xmlHttp.responseText;
			//	loadPatterns(urlpath);

		}
	}
	xmlHttp.open("GET", urlpath, true);
	xmlHttp.send(null);

}


function loadPatterns(path)
{
	//	document.getElementById('testing3').innerHTML= 'pattern scroller';
	

		var loadUrl = path;
		
		var splitnames = path.replace('loadimage','getPattern') 
	xmlHttp1=GetXmlHttpObject()
	if (xmlHttp1==null)
	{
		alert ("Browser does not support HTTP Request")
		return
	}
	// Create a function that will receive data sent from the server
	xmlHttp1.onreadystatechange = function(){
		
		if(xmlHttp1.readyState == 4){
			
			document.getElementById('testing3').innerHTML= xmlHttp1.responseText;
			//alert(xmlHttp1.responseText);
		}
	}
	xmlHttp1.open("GET", splitnames, true);
	xmlHttp1.send(null);
}
