// JavaScript Document
document.write('<div Class="divstyle" id="info" style=\'display:none;\'>')
document.write('<div id="imagetitle" class="pstyletitle" align="center"></div>')
document.write('</div>')


var IE = document.all?true:false

if (!IE) document.captureEvents(Event.MOUSEMOVE)

document.onmousemove = getMouseXY;

var tempX = 0
var tempY = 0

  
function getMouseXY(e) {
  if (IE) { // grab the x-y pos.s if browser is IE
    tempX = event.clientX + document.body.scrollLeft
    tempY = event.clientY + document.body.scrollTop
  } else {  // grab the x-y pos.s if browser is NS
    tempX = e.pageX
    tempY = e.pageY
  }  
  // catch possible negative values in NS4
  if (tempX < 0){tempX = 0}
  if (tempY < 0){tempY = 0}  
  // show the position values in the form named Show
  // in the text fields named MouseX and MouseY
obj_info = document.getElementById("info")
obj_info.style.top = tempY + 10;
obj_info.style.left = tempX + -10;
  return true
}

function alert_msg(titletext){
obj_info = document.getElementById("info")
obj_info.style.display = '';
obj_imagetitle = document.getElementById("imagetitle");
obj_imagetitle.innerHTML = titletext;

}

function away()
{
obj_info = document.getElementById("info")
obj_info.style.display = 'none';
}

function sendMail()
{	
	Para=GetPara()
	if(Para)
	{
		document.getElementById("frmMail").method = "post";
		document.getElementById("frmMail").action = "MailSend.asp";
		document.getElementById("frmMail").submit();		
	} 
}

function login()
{	
	Para=GetPara()
	if(Para)
	{
		
		objXMLHttpRequest.onreadystatechange=ClientOutput;
		var Url = "AdminLog_SrvPg.asp"; //Url of the file in the server.......
		objXMLHttpRequest.open("POST",Url,true);
		objXMLHttpRequest.setRequestHeader("Host","www.designonline.in");
		objXMLHttpRequest.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
		objXMLHttpRequest.setRequestHeader("Content-Length","12");
		objXMLHttpRequest.send(Para); //Data - to be sent to the server......
	} 
}
  
function ClientOutput()
{
	if(objXMLHttpRequest.readyState == "4" )	
	{
		var MsgDet = objXMLHttpRequest.responseText.split("*");
		//document.getElementById("aa").innerHTML = objXMLHttpRequest.responseText
		//alert((MsgDet[1]))
		if(parseInt(MsgDet[1])==2)
		{
			//alert("in")
			document.getElementById("msg").innerHTML=MsgDet[2];
			document.getElementById("AdUid").value="";
			document.getElementById("AdPwd").value="";
		}
		else if(parseInt(MsgDet[1])==1)
		{
			//alert("els")
			document.location.href ="MyPage.asp";
		}
		else if(parseInt(MsgDet[1])==6)
		{
			//alert("els")
			document.location.href ="usrreport.asp";
		}
		else
		{
			//alert("out")
			document.getElementById("msg").innerHTML=MsgDet[2];
			document.getElementById("AdUid").value="";
			document.getElementById("AdPwd").value="";		
		}
		objXMLHttpRequest.abort();
	}
}  
  
//----------------------add / modify  

//===============================  Admin ======================================
 //---------------add / modify 
function addadminNew()
{
	var abcd
	abcd=0
	for(i=0;i<document.getElementById("LstPgDis").options.length;i++)
	{//alert("in")
		//alert(form1.document.getElementById("LstPgDis").options[i].value)
		document.getElementById("LstPgDis").options[i].selected=true;
		abcd = abcd + "-" + document.getElementById("LstPgDis").options[i].value;
		document.form1.page.value=abcd
	}
		
	Para = GetPara()
	if((document.form1.adstat[0].checked==false) && (document.form1.adstat[1].checked==false))
	{
		document.getElementById("Sadstat").innerHTML = "<font color=red>Please activate / de-activate the user</font>"
	}
	else
	{
		document.getElementById("Sadstat").innerHTML = ""	
		if (Para)
		{
			if(document.form1.adstat[0].checked==true)
				Para=Para + "&as=1"
			else
				Para=Para + "&as=0"
				
				if(document.getElementById("PermColor").value == "")
					alert("Please choose a color code")
				//else
				//{
				//	Para = Para + "&PermColor=" + document.getElementById("PermColor").value;
				///	//alert(Para)
				//}	
			
				//alert(Para)
				objXMLHttpRequest.onreadystatechange=addadminNew_output;
				var Url = "Admin_Srv.asp"; //Url of the file in the server.......
				objXMLHttpRequest.open("POST",Url,true);
				objXMLHttpRequest.setRequestHeader("Host","www.designonline.in");
				objXMLHttpRequest.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
				objXMLHttpRequest.setRequestHeader("Content-Length","12");
				objXMLHttpRequest.send(Para); //Data - to be sent to the server......
				document.getElementById("butSave").disabled = true;
		}
	}
}
  
function addadminNew_output()
{
	if(objXMLHttpRequest.readyState == "4" )	
	{
		var	MsgStr = objXMLHttpRequest.responseText.split("*");
		//document.getElementById("a").innerHTML = objXMLHttpRequest.responseText	
		if(parseInt(MsgStr[1])==1)
		{
			document.location.href="Admin.asp?output=1"
		}
		else if(parseInt(MsgStr[1])==2)
		{
			document.location.href="Admin.asp?output=2"
		}
		else if(parseInt(MsgStr[1])==3)
		{
			document.location.href="Admin.asp?output=3"
		}		
		else
		{
			document.location.href="Admin.asp?output=5"				
		}	
	}
}

//---------------add / modify 
function addconsultant()
{
	var abcd
	abcd=0
	
	Para = GetPara()
	if((document.form1.adstat[0].checked==false) && (document.form1.adstat[1].checked==false))
	{
		document.getElementById("Sadstat").innerHTML = "<font color=red>Please activate / de-activate the user</font>"
	}
	else
	{
		document.getElementById("Sadstat").innerHTML = ""	
		if (Para)
		{
			if(document.form1.adstat[0].checked==true)
				Para=Para + "&as=1"
			else
				Para=Para + "&as=0"
			
			//alert(Para)
			objXMLHttpRequest.onreadystatechange=addconsultant_output;
			var Url = "Consult_Srv.asp"; //Url of the file in the server.......
			objXMLHttpRequest.open("POST",Url,true);
			objXMLHttpRequest.setRequestHeader("Host","www.designonline.in");
			objXMLHttpRequest.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
			objXMLHttpRequest.setRequestHeader("Content-Length","12");
			objXMLHttpRequest.send(Para); //Data - to be sent to the server......
			document.getElementById("butSave").disabled = true;
		}
	}
}
  
function addconsultant_output()
{
	if(objXMLHttpRequest.readyState == "4" )	
	{
		var	MsgStr = objXMLHttpRequest.responseText.split("*");
		/*document.getElementById("aaa").innerHTML = objXMLHttpRequest.responseText*/	
		if(parseInt(MsgStr[1])==1)
		{
			document.location.href="Admin.asp?output=1"
		}
		else if(parseInt(MsgStr[1])==2)
		{
			document.location.href="Admin.asp?output=2"
		}
		else if(parseInt(MsgStr[1])==3)
		{
			document.location.href="Admin.asp?output=3"
		}		
		else
		{
			document.location.href="Admin.asp?output=5"				
		}	
	}
}

function addpermission()
{
	var abcd
	abcd=0
	for(i=0;i<document.getElementById("LstPgDis").options.length;i++)
	{//alert("in")
		//alert(form1.document.getElementById("LstPgDis").options[i].value)
		document.getElementById("LstPgDis").options[i].selected=true;
		abcd = abcd + "-" + document.getElementById("LstPgDis").options[i].value;
		document.form1.page.value=abcd
	}
	//alert(form1.page.value)	  
	Para = GetPara()
	if (Para) 
	{
		//alert(Para)
		if(document.getElementById("PermColor").value == "")
			alert("Please choose a color code")
		else
		{
			Para = Para + "&PermColor=" + document.getElementById("PermColor").value;
			//alert(Para)
			objXMLHttpRequest.onreadystatechange=addpermission_output;
			var Url = "per_SrvPg_N.asp"; //Url of the file in the server.......
			objXMLHttpRequest.open("POST",Url,true);		
			objXMLHttpRequest.setRequestHeader("Host","www.designonline.in");
			objXMLHttpRequest.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
			objXMLHttpRequest.setRequestHeader("Content-Length","12");
			objXMLHttpRequest.send(Para); //Data - to be sent to the server......
			//document.getElementById("butSave").disabled = true;
		}
	}
}
  
function addpermission_output()
{
	if(objXMLHttpRequest.readyState == "4" )	
	{
		var	MsgStr = objXMLHttpRequest.responseText.split("*");
	//document.getElementById("aaa").innerHTML = objXMLHttpRequest.responseText
	//if(MsgStr[1] == "5")
	//	document.location.href="permission.asp?output=5"
	//else
	//	document.location.href="permission.asp?output=1"
		//document.location.href="XmlGen.asp"
		if(parseInt(MsgStr[1])==1)
		{
		document.location.href="admin.asp?output=1"
		}
		else if(parseInt(MsgStr[1])==2)
		{
			document.location.href="admin.asp?output=2"
		}
		else
		{
			document.location.href="admin.asp?output=2"
		}	
	}
}

function GetColorCod(cod)
{//alert(cod)
	var colr
	colr = cod
	document.getElementById("PermColor").value = colr;
	//document.getElementById("colo").style.background = cod;
	
	document.getElementById("colo").style.background = '#'+colr+'';	
}
function modipermission(Id)
{
	Form = document.createElement("form");
	Form.name = "frmSrch";
	Form.id = "frmSrch";
	
	Input = document.createElement("input");
	Input.type = "hidden";
	Input.name = "PermId";
	Input.id = "PermId";
	Input.value = Id;
	Form.appendChild(Input);

	document.body.appendChild(Form);
	Form.action = "AddPermission.asp";
	Form.method="post"
	Form.submit();
}
function Sel_ondblclick(LstSrc,LstDist) {
 // alert(document.getElementById("LstPgDis").value)
	if(document.getElementById(LstSrc).selectedIndex==-1)
		alert("Select Properly");
	else
	{	var Opt = document.createElement("option");
		Opt.text = document.getElementById(LstSrc).options[document.getElementById(LstSrc).selectedIndex].text; 
		Opt.value = document.getElementById(LstSrc).options[document.getElementById(LstSrc).selectedIndex].value;
		document.getElementById(LstDist).options.add(Opt);
		document.getElementById(LstSrc).remove(document.getElementById(LstSrc).selectedIndex);	
	}
}
function Sel_ondblclickSS(LstSrc,LstDist) {
//alert(document.getElementById("LstPgDis").value)
	if(document.getElementById(LstSrc).selectedIndex==-1)
		alert("Select Properly");
	else
	{	var Opt = document.createElement("option");
		Opt.text = document.getElementById(LstSrc).options[document.getElementById(LstSrc).selectedIndex].text; 
		Opt.value = document.getElementById(LstSrc).options[document.getElementById(LstSrc).selectedIndex].value;
		document.getElementById(LstDist).options.add(Opt);
		document.getElementById(LstSrc).remove(document.getElementById(LstSrc).selectedIndex);	
	}
	
}
//===============================  Admin ======================================
 //---------------add / modify 
function addadmin()
{	
	Para = GetPara()
	if((document.form1.adstat[0].checked==false) && (document.form1.adstat[1].checked==false))
	{
		document.getElementById("Sadstat").innerHTML = "<font color=red>Please activate / de-activate the user</font>"
	}
	else
	{
		document.getElementById("Sadstat").innerHTML = ""	
		if (Para)
		{
		if(document.form1.adstat[0].checked==true)
			Para=Para + "&as=1"
		else
			Para=Para + "&as=0"		
		//	alert(Para)
			objXMLHttpRequest.onreadystatechange=addadmin_output;
			var Url = "Admin_Srv.asp"; //Url of the file in the server.......
			objXMLHttpRequest.open("POST",Url,true);
			objXMLHttpRequest.setRequestHeader("Host","www.designonline.in");
			objXMLHttpRequest.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
			objXMLHttpRequest.setRequestHeader("Content-Length","12");
			objXMLHttpRequest.send(Para); //Data - to be sent to the server......
			document.getElementById("butSave").disabled = true;
		}
	}
}
  
function addadmin_output()
{
	if(objXMLHttpRequest.readyState == "4" )	
	{
		var	MsgStr = objXMLHttpRequest.responseText.split("*");
		//document.getElementById("a").innerHTML = objXMLHttpRequest.responseText	
		if(parseInt(MsgStr[1])==1)
		{
			document.location.href="Admin.asp?output=1"
		}
		else if(parseInt(MsgStr[1])==2)
		{
			document.location.href="Admin.asp?output=2"
		}
		else if(parseInt(MsgStr[1])==3)
		{
			document.location.href="Admin.asp?output=3"
		}		
		else
		{
			document.location.href="Admin.asp?output=5"				
		}	
	}
}

function editadmin()
{	
	Para = GetPara()
		
		if (Para)
		{
		
			objXMLHttpRequest.onreadystatechange=editadmin_output;
			var Url = "UpdatAdmin_Srv.asp"; //Url of the file in the server.......
			objXMLHttpRequest.open("POST",Url,true);
			objXMLHttpRequest.setRequestHeader("Host","www.designonline.in");
			objXMLHttpRequest.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
			objXMLHttpRequest.setRequestHeader("Content-Length","12");
			objXMLHttpRequest.send(Para); //Data - to be sent to the server......
			document.getElementById("butSave").disabled = true;
		}
	//}
}
  
function editadmin_output()
{
	if(objXMLHttpRequest.readyState == "4" )	
	{
		var	MsgStr = objXMLHttpRequest.responseText.split("*");
		//document.getElementById("aaa").innerHTML = objXMLHttpRequest.responseText	
		if(parseInt(MsgStr[1])==1)
		{
			document.location.href="view-myprofile.asp?output=1"
		}
		else if(parseInt(MsgStr[1])==2)
		{
			document.location.href="view-myprofile.asp?output=2"
		}
		else if(parseInt(MsgStr[1])==3)
		{
			document.location.href="view-myprofile.asp?output=3"
		}		
		else
		{
			document.location.href="view-myprofile.asp?output=5"				
		}	
	}
}

function edtadmin()
{	
	Para = GetPara()		
	if (Para)
	{		
		objXMLHttpRequest.onreadystatechange=edtadmin_output;
		var Url = "editadmin_Srv.asp"; //Url of the file in the server.......
		objXMLHttpRequest.open("POST",Url,true);
		objXMLHttpRequest.setRequestHeader("Host","www.designonline.in");
		objXMLHttpRequest.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
		objXMLHttpRequest.setRequestHeader("Content-Length","12");
		objXMLHttpRequest.send(Para); //Data - to be sent to the server......
		document.getElementById("butSave").disabled = true;
	}
}
  
function edtadmin_output()
{
	if(objXMLHttpRequest.readyState == "4" )	
	{
		var	MsgStr = objXMLHttpRequest.responseText.split("*");
		document.getElementById("a").innerHTML = objXMLHttpRequest.responseText	
		if(parseInt(MsgStr[1])==1)
		{
			document.location.href="Admin.asp?output=1"
		}
		else if(parseInt(MsgStr[1])==2)
		{
			document.location.href="Admin.asp?output=2"
		}
		else if(parseInt(MsgStr[1])==3)
		{
			document.location.href="Admin.asp?output=3"
		}		
		else
		{
			document.location.href="Admin.asp?output=5"				
		}	
	}
}


//===============================  Admin ======================================
 //---------------add / modify 
function addEntry()
{	
	Para = GetPara()
	//if((document.form1.adstat[0].checked==false) && (document.form1.adstat[1].checked==false))
	//{
	//	document.getElementById("Sadstat").innerHTML = "<font color=red>Please activate / de-activate the user</font>"
	//}
	//else
	//{
	//	document.getElementById("Sadstat").innerHTML = ""	
		if (Para)
		{
			//if(document.form1.adstat[0].checked==true)
			//	Para=Para + "&as=1"
			//else
			//	Para=Para + "&as=0"
		
			//alert(Para)
			objXMLHttpRequest.onreadystatechange=addEntry_output;
			var Url = "Entry_Srv.asp"; //Url of the file in the server.......
			objXMLHttpRequest.open("POST",Url,true);
			objXMLHttpRequest.setRequestHeader("Host","www.designonline.in");
			objXMLHttpRequest.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
			objXMLHttpRequest.setRequestHeader("Content-Length","12");
			objXMLHttpRequest.send(Para); //Data - to be sent to the server......
			//document.getElementById("butSave").disabled = true;
		}
	//}
}
  
function addEntry_output()
{
	if(objXMLHttpRequest.readyState == "4" )	
	{
		var	MsgStr = objXMLHttpRequest.responseText.split("*");
		//document.getElementById("aaaa").innerHTML = objXMLHttpRequest.responseText
		//document.location.href="XmlGen.asp"
		//alert(objXMLHttpRequest.responseText)	
		if(parseInt(MsgStr[1])==1)
		{
			document.location.href="usrreport.asp?output=1"
		}
		else if(parseInt(MsgStr[1])==2)
		{
			document.location.href="usrreport.asp?output=2"
		}
		else if(parseInt(MsgStr[1])==3)
		{
			document.location.href="usrreport.asp?output=3"
		}		
		else
		{
			document.location.href="usrreport.asp?output=5"				
		}	
	}
}
function UpdateEntry()
{
		
		Para = GetPara()
		if (Para)
		{
			//if(document.form1.adstat[0].checked==true)
			//	Para=Para + "&as=1"
			//else
			//	Para=Para + "&as=0"
			//Para =""
			//alert(Para)
			objXMLHttpRequest.onreadystatechange=UpdateEntry_output;
			var Url = "UpdateEntry_Srv.asp"; //Url of the file in the server.......
			objXMLHttpRequest.open("POST",Url,true);
			objXMLHttpRequest.setRequestHeader("Host","www.designonline.in");
			objXMLHttpRequest.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
			objXMLHttpRequest.setRequestHeader("Content-Length","12");
			objXMLHttpRequest.send(Para); //Data - to be sent to the server......
			//document.getElementById("butSave").disabled = true;
		}
	//}
}
  
function UpdateEntry_output()
{
	if(objXMLHttpRequest.readyState == "4" )	
	{
		var	MsgStr = objXMLHttpRequest.responseText.split("***");
		//document.getElementById("MsgDet").innerHTML = objXMLHttpRequest.responseText
		UpdatEnq(MsgStr[1])
					
	}
}

//===============================  Admin ======================================
 //---------------add / modify 
function addStatus()
{	
	Para = GetPara()
	if((document.form1.adstat[0].checked==false) && (document.form1.adstat[1].checked==false))
	{
		document.getElementById("Sadstat").innerHTML = "<font color=red>Please activate / de-activate the user</font>"
	}
	else
	{
		document.getElementById("Sadstat").innerHTML = ""	
		if (Para)
		{
			if(document.form1.adstat[0].checked==true)
				Para=Para + "&as=1"
			else
				Para=Para + "&as=0"
		
			//alert(Para)
			objXMLHttpRequest.onreadystatechange=addStatus_output;
			var Url = "StatusUpdt_Srv.asp"; //Url of the file in the server.......
			objXMLHttpRequest.open("POST",Url,true);
			objXMLHttpRequest.setRequestHeader("Host","www.designonline.in");
			objXMLHttpRequest.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
			objXMLHttpRequest.setRequestHeader("Content-Length","12");
			objXMLHttpRequest.send(Para); //Data - to be sent to the server......
			document.getElementById("butSave").disabled = true;
		}
	}
}
  
function addStatus_output()
{
	if(objXMLHttpRequest.readyState == "4" )	
	{
		var	MsgStr = objXMLHttpRequest.responseText.split("*");
		//document.getElementById("aaaa").innerHTML = objXMLHttpRequest.responseText	
		if(parseInt(MsgStr[1])==1)
		{
			document.location.href="Status.asp?output=1"
		}
		else if(parseInt(MsgStr[1])==2)
		{
			document.location.href="Status.asp?output=2"
		}
		else if(parseInt(MsgStr[1])==3)
		{
			document.location.href="Status.asp?output=3"
		}		
		else
		{
			document.location.href="Status.asp?output=5"				
		}	
	}
}

//===============================  Admin ======================================
 //---------------add / modify 
function addOpportunity()
{	
	Para = GetPara()
	if((document.form1.adstat[0].checked==false) && (document.form1.adstat[1].checked==false))
	{
		document.getElementById("Sadstat").innerHTML = "<font color=red>Please activate / de-activate the user</font>"
	}
	else
	{
		document.getElementById("Sadstat").innerHTML = ""	
		if (Para)
		{
			if(document.form1.adstat[0].checked==true)
				Para=Para + "&as=1"
			else
				Para=Para + "&as=0"
		
			//alert(Para)
			objXMLHttpRequest.onreadystatechange=addOpportunity_output;
			var Url = "Opportunity_Srv.asp"; //Url of the file in the server.......
			objXMLHttpRequest.open("POST",Url,true);
			objXMLHttpRequest.setRequestHeader("Host","www.designonline.in");
			objXMLHttpRequest.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
			objXMLHttpRequest.setRequestHeader("Content-Length","12");
			objXMLHttpRequest.send(Para); //Data - to be sent to the server......
			document.getElementById("butSave").disabled = true;
		}
	}
}
  
function addOpportunity_output()
{
	if(objXMLHttpRequest.readyState == "4" )	
	{
		var	MsgStr = objXMLHttpRequest.responseText.split("*");
		document.getElementById("aaaa").innerHTML = objXMLHttpRequest.responseText	
		if(parseInt(MsgStr[1])==1)
		{
			document.location.href="Opportunity.asp?output=1"
		}
		else if(parseInt(MsgStr[1])==2)
		{
			document.location.href="Opportunity.asp?output=2"
		}
		else if(parseInt(MsgStr[1])==3)
		{
			document.location.href="Opportunity.asp?output=3"
		}		
		else
		{
			document.location.href="Opportunity.asp?output=5"				
		}	
	}
}
//===============================  Admin ======================================
 //---------------add / modify 
function addstate()
{	
	Para = GetPara()
	if((document.form1.adstat[0].checked==false) && (document.form1.adstat[1].checked==false))
	{
		document.getElementById("Sadstat").innerHTML = "<font color=red>Please activate / de-activate the user</font>"
	}
	else
	{
		document.getElementById("Sadstat").innerHTML = ""	
		if (Para)
		{
		if(document.form1.adstat[0].checked==true)
			Para=Para + "&as=1"
		else
			Para=Para + "&as=0"	
		
		//	alert(Para)
			objXMLHttpRequest.onreadystatechange=addstate_output;
			var Url = "State_Srv.asp"; //Url of the file in the server.......
			objXMLHttpRequest.open("POST",Url,true);
			objXMLHttpRequest.setRequestHeader("Host","www.designonline.in");
			objXMLHttpRequest.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
			objXMLHttpRequest.setRequestHeader("Content-Length","12");
			objXMLHttpRequest.send(Para); //Data - to be sent to the server......
			document.getElementById("butSave").disabled = true;
		}
	}
}
  
function addstate_output()
{
	if(objXMLHttpRequest.readyState == "4" )	
	{
		var	MsgStr = objXMLHttpRequest.responseText.split("*");
		//document.getElementById("a").innerHTML = objXMLHttpRequest.responseText	
		if(parseInt(MsgStr[1])==1)
		{
			document.location.href="States.asp?output=1"
		}
		else if(parseInt(MsgStr[1])==2)
		{
			document.location.href="States.asp?output=2"
		}
		else if(parseInt(MsgStr[1])==3)
		{
			document.location.href="States.asp?output=3"
		}		
		else
		{
			document.location.href="States.asp?output=5"				
		}	
	}
}

function UpdatEnq(enq)
{
	Form = document.createElement("form");
	Form.name = "frmNews";
	Form.id = "frmNews";
	
	Input = document.createElement("input");	
	Input.type = "hidden";
	Input.name = "EnqId";
	Input.id = "EnqId";
	Input.value = enq;
	Form.appendChild(Input);

	document.body.appendChild(Form);
	Form.action = "AddEntry.asp";
	Form.method="post"
	Form.submit();
}
function modiadmin(adid)
{
	Form = document.createElement("form");
	Form.name = "frmNews";
	Form.id = "frmNews";
	
	Input = document.createElement("input");	
	Input.type = "hidden";
	Input.name = "adid";
	Input.id = "adid";
	Input.value = adid;
	Form.appendChild(Input);

	document.body.appendChild(Form);
	Form.action = "addadmin.asp";
	Form.method="post"
	Form.submit();
}
function editprof(adid)
{
	Form = document.createElement("form");
	Form.name = "frmNews";
	Form.id = "frmNews";
	
	Input = document.createElement("input");	
	Input.type = "hidden";
	Input.name = "adid";
	Input.id = "adid";
	Input.value = adid;
	Form.appendChild(Input);

	document.body.appendChild(Form);
	Form.action = "edtAdmin.asp";
	Form.method="post"
	Form.submit();
}

function modiprofile(adid)
{
	Form = document.createElement("form");
	Form.name = "frmNews";
	Form.id = "frmNews";
	
	Input = document.createElement("input");	
	Input.type = "hidden";
	Input.name = "adid";
	Input.id = "adid";
	Input.value = adid;
	Form.appendChild(Input);

	document.body.appendChild(Form);
	Form.action = "edit-profile.asp";
	Form.method="post"
	Form.submit();
}
function modistatus(adid)
{
	Form = document.createElement("form");
	Form.name = "frmNews";
	Form.id = "frmNews";
	
	Input = document.createElement("input");	
	Input.type = "hidden";
	Input.name = "StatusId";
	Input.id = "StatusId";
	Input.value = adid;
	Form.appendChild(Input);

	document.body.appendChild(Form);
	Form.action = "addStatus.asp";
	Form.method="post"
	Form.submit();
}
function modiopp(adid)
{
	Form = document.createElement("form");
	Form.name = "frmNews";
	Form.id = "frmNews";
	
	Input = document.createElement("input");	
	Input.type = "hidden";
	Input.name = "OppId";
	Input.id = "OppId";
	Input.value = adid;
	Form.appendChild(Input);

	document.body.appendChild(Form);
	Form.action = "AddOpportunity.asp";
	Form.method="post"
	Form.submit();
}
function modistate(adid)
{
	Form = document.createElement("form");
	Form.name = "frmNews";
	Form.id = "frmNews";
	
	Input = document.createElement("input");	
	Input.type = "hidden";
	Input.name = "StateId";
	Input.id = "StateId";
	Input.value = adid;
	Form.appendChild(Input);

	document.body.appendChild(Form);
	Form.action = "AddState.asp";
	Form.method="post"
	Form.submit();
}

 //------------delete admin
   function Delete_AOnclick(Id){
	var VarChoic = confirm("Are you sure!.. want to delete");
	if(VarChoic)
	{
		Para=GetPara() + '&Id='+Id
	//	alert(Para)
  		objXMLHttpRequest.onreadystatechange=DelAClientOutput;
		var Url = "DelData.asp"; 
		objXMLHttpRequest.open("POST",Url,true);
		objXMLHttpRequest.setRequestHeader("Host","www.designonline.in");
		objXMLHttpRequest.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
		objXMLHttpRequest.setRequestHeader("Content-Length","12");
		objXMLHttpRequest.send(Para);
	}	
  }
  
function DelAClientOutput()
{
	if(objXMLHttpRequest.readyState == "4" )	
	{
	
		var	MsgStr = objXMLHttpRequest.responseText.split("*");
		//document.getElementById("a").innerHTML = objXMLHttpRequest.responseText
		if(parseInt(MsgStr[1])==4)
		{
			document.location.href="admin.asp?output=1"
		}
		else if(parseInt(MsgStr[1])==5)
		{
			document.location.href="admin.asp?output=7"
		}
		else if(parseInt(MsgStr[1])==3)
		{
			document.location.href="admin.asp?output=3"
		}			
		else if(parseInt(MsgStr[1])==0)
		{
			document.location.href="admin.asp?output=4"
		}			
		else
		{
			document.location.href="admin.asp?output=5"				
		}
	}
} 

//------------delete admin
   function Delete_StatusOnclick(Id){
	var VarChoic = confirm("Are you sure!.. want to delete");
	if(VarChoic)
	{
		Para=GetPara() + '&Id='+Id
		//alert(Para)
  		objXMLHttpRequest.onreadystatechange=Delete_StatusOutput;
		var Url = "DelData.asp"; 
		objXMLHttpRequest.open("POST",Url,true);
		objXMLHttpRequest.setRequestHeader("Host","www.designonline.in");
		objXMLHttpRequest.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
		objXMLHttpRequest.setRequestHeader("Content-Length","12");
		objXMLHttpRequest.send(Para);
	}	
  }
  
function Delete_StatusOutput()
{
	if(objXMLHttpRequest.readyState == "4" )	
	{
	
		var	MsgStr = objXMLHttpRequest.responseText.split("*");
		//document.getElementById("a").innerHTML = objXMLHttpRequest.responseText
		if(parseInt(MsgStr[1])==4)
		{
			document.location.href="Status.asp?output=1"
		}
		else if(parseInt(MsgStr[1])==5)
		{
			document.location.href="Status.asp?output=7"
		}
		else if(parseInt(MsgStr[1])==3)
		{
			document.location.href="Status.asp?output=3"
		}			
		else if(parseInt(MsgStr[1])==0)
		{
			document.location.href="Status.asp?output=4"
		}			
		else
		{
			document.location.href="Status.asp?output=5"				
		}
	}
} 


//------------delete admin
   function Delete_OppOnclick(Id){
	var VarChoic = confirm("Are you sure!.. want to delete");
	if(VarChoic)
	{
		Para=GetPara() + '&Id='+Id
		//alert(Para)
  		objXMLHttpRequest.onreadystatechange=Delete_OppOutput;
		var Url = "DelData.asp"; 
		objXMLHttpRequest.open("POST",Url,true);
		objXMLHttpRequest.setRequestHeader("Host","www.designonline.in");
		objXMLHttpRequest.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
		objXMLHttpRequest.setRequestHeader("Content-Length","12");
		objXMLHttpRequest.send(Para);
	}	
  }
  
function Delete_OppOutput()
{
	if(objXMLHttpRequest.readyState == "4" )	
	{
	
		var	MsgStr = objXMLHttpRequest.responseText.split("*");
		//document.getElementById("a").innerHTML = objXMLHttpRequest.responseText
		if(parseInt(MsgStr[1])==4)
		{
			document.location.href="Opportunity.asp?output=1"
		}
		else if(parseInt(MsgStr[1])==5)
		{
			document.location.href="Opportunity.asp?output=7"
		}
		else if(parseInt(MsgStr[1])==3)
		{
			document.location.href="Opportunity.asp?output=3"
		}			
		else if(parseInt(MsgStr[1])==0)
		{
			document.location.href="Opportunity.asp?output=4"
		}			
		else
		{
			document.location.href="Opportunity.asp?output=5"				
		}
	}
} 

//------------delete admin
   function Delete_PermOnclick(Id){
	var VarChoic = confirm("Are you sure!.. want to delete");
	if(VarChoic)
	{
		Para=GetPara() + '&Id='+Id
		//alert(Para)
  		objXMLHttpRequest.onreadystatechange=Delete_PermOutput;
		var Url = "DelData.asp"; 
		objXMLHttpRequest.open("POST",Url,true);
		objXMLHttpRequest.setRequestHeader("Host","www.designonline.in");
		objXMLHttpRequest.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
		objXMLHttpRequest.setRequestHeader("Content-Length","12");
		objXMLHttpRequest.send(Para);
	}	
  }
  
function Delete_PermOutput()
{
	if(objXMLHttpRequest.readyState == "4" )	
	{
	
		var	MsgStr = objXMLHttpRequest.responseText.split("*");
		//document.getElementById("a").innerHTML = objXMLHttpRequest.responseText
		if(parseInt(MsgStr[1])==4)
		{
			document.location.href="Permission.asp?output=1"
		}
		else if(parseInt(MsgStr[1])==5)
		{
			document.location.href="Permission.asp?output=7"
		}
		else if(parseInt(MsgStr[1])==3)
		{
			document.location.href="Permission.asp?output=3"
		}			
		else if(parseInt(MsgStr[1])==0)
		{
			document.location.href="Permission.asp?output=4"
		}			
		else
		{
			document.location.href="Permission.asp?output=5"				
		}
	}
}  
  
  


///===============================  News ======================================
 //---------------add / modify 
/*function AddNews()
{	
	Para = GetPara()
	if((form1.adstat[0].checked==false) && (form1.adstat[1].checked==false))
	{
		document.getElementById("SNwStat").innerHTML = "<font color=red>Please activate / de-activate the user</font>"
	}
	else
	{
		document.getElementById("SNwStat").innerHTML = ""	
		if (Para)
		{
			if(form1.NwStat[0].checked==true)
				Para=Para + "&as=1"
			else
				Para=Para + "&as=0"	
		
				alert(Para)
			objXMLHttpRequest.onreadystatechange = AddNews_output;
			var Url = "News_Srv.asp"; //Url of the file in the server.......
			objXMLHttpRequest.open("POST",Url,true);
			objXMLHttpRequest.setRequestHeader("Host","www.designonline.in");
			objXMLHttpRequest.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
			objXMLHttpRequest.setRequestHeader("Content-Length","12");
			objXMLHttpRequest.send(Para); //Data - to be sent to the server......
			document.getElementById("butSave").disabled = true;
		}
	}
}
  
function AddNews_output()
{
	if(objXMLHttpRequest.readyState == "4" )	
	{
		var	MsgStr = objXMLHttpRequest.responseText.split("*");
	//document.getElementById("a").innerHTML = objXMLHttpRequest.responseText	
		if(parseInt(MsgStr[1])==1)
		{
			document.location.href="news-events.asp?output=1"
		}
		else if(parseInt(MsgStr[1])==2)
		{
			document.location.href="news-events.asp?output=2"
		}		
		else
		{
			document.location.href="news-events.asp?output=5"				
		}	
	}
}
*/



function modiNews(adid)
{
	Form = document.createElement("form");
	Form.name = "frmNews";
	Form.id = "frmNews";
	
	Input = document.createElement("input");	
	Input.type = "hidden";
	Input.name = "NwId";
	Input.id = "NwId";
	Input.value = adid;
	Form.appendChild(Input);

	document.body.appendChild(Form);
	Form.action = "addNews.asp";
	Form.method="post"
	Form.submit();
}

function modiMedia(adid)
{
	Form = document.createElement("form");
	Form.name = "frmNews";
	Form.id = "frmNews";
	
	Input = document.createElement("input");	
	Input.type = "hidden";
	Input.name = "MedId";
	Input.id = "MedId";
	Input.value = adid;
	Form.appendChild(Input);

	document.body.appendChild(Form);
	Form.action = "addMedia.asp";
	Form.method="post"
	Form.submit();
}

 //------------delete admin
   function Delete_NewsOnclick(Id){
	var VarChoic = confirm("Are you sure!.. want to delete");
	if(VarChoic)
	{
		Para=GetPara() + '&Id='+Id
	//	alert(Para)
  		objXMLHttpRequest.onreadystatechange=Delete_NewsOnclickOutput;
		var Url = "DelData.asp"; 
		objXMLHttpRequest.open("POST",Url,true);
		objXMLHttpRequest.setRequestHeader("Host","www.designonline.in");
		objXMLHttpRequest.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
		objXMLHttpRequest.setRequestHeader("Content-Length","12");
		objXMLHttpRequest.send(Para);
	}	
  }
  
  function Delete_NewsOnclickOutput()
  {
	if(objXMLHttpRequest.readyState == "4" )	
	{
	
		var	MsgStr = objXMLHttpRequest.responseText.split("*");
		//document.getElementById("aaa").innerHTML = objXMLHttpRequest.responseText
			if(parseInt(MsgStr[1])==4)
			{
				document.location.href="news-events.asp?output=1"
			}
			else if(parseInt(MsgStr[1])==5)
			{
				document.location.href="news-events.asp?output=7"
			}
			else if(parseInt(MsgStr[1])==3)
			{
				document.location.href="news-events.asp?output=3"
			}			
			else if(parseInt(MsgStr[1])==0)
			{
				document.location.href="news-events.asp?output=4"
			}			
			else
			{
				document.location.href="news-events.asp?output=5"				
			}

	}
  } 
  
  
//------------delete admin
   function Delete_MediaOnclick(Id){
	var VarChoic = confirm("Are you sure!.. want to delete");
	if(VarChoic)
	{
		Para=GetPara() + '&Id='+Id
	//	alert(Para)
  		objXMLHttpRequest.onreadystatechange=Delete_MediaOnclickOutput;
		var Url = "DelData.asp"; 
		objXMLHttpRequest.open("POST",Url,true);
		objXMLHttpRequest.setRequestHeader("Host","www.designonline.in");
		objXMLHttpRequest.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
		objXMLHttpRequest.setRequestHeader("Content-Length","12");
		objXMLHttpRequest.send(Para);
	}	
  }
  
  function Delete_MediaOnclickOutput()
  {
	if(objXMLHttpRequest.readyState == "4" )	
	{
	
		var	MsgStr = objXMLHttpRequest.responseText.split("*");
		//document.getElementById("a").innerHTML = objXMLHttpRequest.responseText
			if(parseInt(MsgStr[1])==4)
			{
				document.location.href="Media.asp?output=1"
			}
			else if(parseInt(MsgStr[1])==5)
			{
				document.location.href="Media.asp?output=7"
			}
			else if(parseInt(MsgStr[1])==3)
			{
				document.location.href="Media.asp?output=3"
			}			
			else if(parseInt(MsgStr[1])==0)
			{
				document.location.href="Media.asp?output=4"
			}			
			else
			{
				document.location.href="Media.asp?output=5"				
			}

	}
  } 

function modiCCal(adid)
{
	Form = document.createElement("form");
	Form.name = "frmNews";
	Form.id = "frmNews";
	
	Input = document.createElement("input");	
	Input.type = "hidden";
	Input.name = "CCalId";
	Input.id = "CCalId";
	Input.value = adid;
	Form.appendChild(Input);

	document.body.appendChild(Form);
	Form.action = "addCCal.asp";
	Form.method="post"
	Form.submit();
}

 //------------delete admin
   function Delete_CCalOnclick(Id){
	var VarChoic = confirm("Are you sure!.. want to delete");
	if(VarChoic)
	{
		Para=GetPara() + '&Id='+Id
	//	alert(Para)
  		objXMLHttpRequest.onreadystatechange=Delete_CCalOnclickOutput;
		var Url = "DelData.asp"; 
		objXMLHttpRequest.open("POST",Url,true);
		objXMLHttpRequest.setRequestHeader("Host","www.designonline.in");
		objXMLHttpRequest.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
		objXMLHttpRequest.setRequestHeader("Content-Length","12");
		objXMLHttpRequest.send(Para);
	}	
  }
  
  function Delete_CCalOnclickOutput()
  {
	if(objXMLHttpRequest.readyState == "4" )	
	{
	
		var	MsgStr = objXMLHttpRequest.responseText.split("*");
		//document.getElementById("a").innerHTML = objXMLHttpRequest.responseText
			if(parseInt(MsgStr[1])==4)
			{
				document.location.href="CCalendar.asp?output=1"
			}
			else if(parseInt(MsgStr[1])==5)
			{
				document.location.href="CCalendar.asp?output=7"
			}
			else if(parseInt(MsgStr[1])==3)
			{
				document.location.href="CCalendar.asp?output=3"
			}			
			else if(parseInt(MsgStr[1])==0)
			{
				document.location.href="CCalendar.asp?output=4"
			}			
			else
			{
				document.location.href="CCalendar.asp?output=5"				
			}

	}
  } 
  
  function modiPhotos(adid)
{
	Form = document.createElement("form");
	Form.name = "frmNews";
	Form.id = "frmNews";
	
	Input = document.createElement("input");	
	Input.type = "hidden";
	Input.name = "PhId";
	Input.id = "PhId";
	Input.value = adid;
	Form.appendChild(Input);

	document.body.appendChild(Form);
	Form.action = "addPhotos.asp";
	Form.method="post"
	Form.submit();
}

 //------------delete admin
   function Delete_PhotoOnclick(Id){
	var VarChoic = confirm("Are you sure!.. want to delete");
	if(VarChoic)
	{
		Para=GetPara() + '&Id='+Id
	//	alert(Para)
  		objXMLHttpRequest.onreadystatechange=Delete_PhotoOnclickOutput;
		var Url = "DelData.asp"; 
		objXMLHttpRequest.open("POST",Url,true);
		objXMLHttpRequest.setRequestHeader("Host","www.designonline.in");
		objXMLHttpRequest.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
		objXMLHttpRequest.setRequestHeader("Content-Length","12");
		objXMLHttpRequest.send(Para);
	}	
  }
  
  function Delete_PhotoOnclickOutput()
  {
	if(objXMLHttpRequest.readyState == "4" )	
	{
	
		var	MsgStr = objXMLHttpRequest.responseText.split("*");
		//document.getElementById("a").innerHTML = objXMLHttpRequest.responseText
		if(parseInt(MsgStr[1])==4)
		{
			document.location.href="PhotoGallery.asp?output=1"
		}
		else if(parseInt(MsgStr[1])==5)
		{
			document.location.href="PhotoGallery.asp?output=7"
		}
		else if(parseInt(MsgStr[1])==3)
		{
			document.location.href="PhotoGallery.asp?output=3"
		}			
		else if(parseInt(MsgStr[1])==0)
		{
			document.location.href="PhotoGallery.asp?output=4"
		}			
		else
		{
			document.location.href="PhotoGallery.asp?output=5"				
		}
	}
  } 
///===============================  News ======================================
 //---------------add / modify 
function AddDepartment()
{	
	Para = GetPara()
	if((form1.DepStat[0].checked==false) && (form1.DepStat[1].checked==false))
	{
		document.getElementById("SDepStat").innerHTML = "<font color=red>Please activate / de-activate the user</font>"
	}
	else
	{
		document.getElementById("SDepStat").innerHTML = ""	
		if (Para)
		{
			if(form1.DepStat[0].checked==true)
				Para=Para + "&as=1"
			else
				Para=Para + "&as=0"		
			//	alert(Para)
			objXMLHttpRequest.onreadystatechange = AddDepartment_output;
			var Url = "Department_Srv.asp"; //Url of the file in the server.......
			objXMLHttpRequest.open("POST",Url,true);
			objXMLHttpRequest.setRequestHeader("Host","www.designonline.in");
			objXMLHttpRequest.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
			objXMLHttpRequest.setRequestHeader("Content-Length","12");
			objXMLHttpRequest.send(Para); //Data - to be sent to the server......
			document.getElementById("butSave").disabled = true;
		}
	}
}
  
function AddDepartment_output()
{
	if(objXMLHttpRequest.readyState == "4" )	
	{
		var	MsgStr = objXMLHttpRequest.responseText.split("*");
	document.getElementById("a").innerHTML = objXMLHttpRequest.responseText	
		if(parseInt(MsgStr[1])==1)
		{
			document.location.href="Department.asp?output=1"
		}
		else if(parseInt(MsgStr[1])==2)
		{
			document.location.href="Department.asp?output=2"
		}		
		else
		{
			document.location.href="Department.asp?output=5"				
		}	
	}
}

function modiDept(adid)
{
	Form = document.createElement("form");
	Form.name = "frmNews";
	Form.id = "frmNews";
	
	Input = document.createElement("input");	
	Input.type = "hidden";
	Input.name = "DepId";
	Input.id = "DepId";
	Input.value = adid;
	Form.appendChild(Input);

	document.body.appendChild(Form);
	Form.action = "AddDepartment.asp";
	Form.method="post"
	Form.submit();
}

 //------------delete admin
   function Delete_DeptOnclick(Id){
	var VarChoic = confirm("Are you sure!.. want to delete");
	if(VarChoic)
	{
		Para=GetPara() + '&Id='+Id
	//	alert(Para)
  		objXMLHttpRequest.onreadystatechange=Delete_DeptOnclickOutput;
		var Url = "DelData.asp"; 
		objXMLHttpRequest.open("POST",Url,true);
		objXMLHttpRequest.setRequestHeader("Host","www.designonline.in");
		objXMLHttpRequest.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
		objXMLHttpRequest.setRequestHeader("Content-Length","12");
		objXMLHttpRequest.send(Para);
	}	
  }
  
function Delete_DeptOnclickOutput()
{
	if(objXMLHttpRequest.readyState == "4" )	
	{	
		var	MsgStr = objXMLHttpRequest.responseText.split("*");
		//document.getElementById("a").innerHTML = objXMLHttpRequest.responseText
		if(parseInt(MsgStr[1])==4)
		{
			document.location.href="Department.asp?output=1"
		}
		else if(parseInt(MsgStr[1])==5)
		{
			document.location.href="Department.asp?output=7"
		}
		else if(parseInt(MsgStr[1])==3)
		{
			document.location.href="Department.asp?output=3"
		}			
		else if(parseInt(MsgStr[1])==0)
		{
			document.location.href="Department.asp?output=4"
		}			
		else
		{
			document.location.href="Department.asp?output=5"				
		}
	}
} 

function modiphoto(phid)
{
	Form = document.createElement("form");
	Form.name = "frmNews";
	Form.id = "frmNews";
	
	Input = document.createElement("input");	
	Input.type = "hidden";
	Input.name = "phid";
	Input.id = "phid";
	Input.value = phid;
	Form.appendChild(Input);

	document.body.appendChild(Form);
	Form.action = "addphoto.asp";
	Form.method="post"
	Form.submit();
}

 //------------delete admin
   function Delete_POnclick(Id){
	var VarChoic = confirm("Are you sure!.. want to delete");
	if(VarChoic)
	{
		Para=GetPara() + '&Id='+Id
	//	alert(Para)
  		objXMLHttpRequest.onreadystatechange=Delete_POnclickOutput;
		var Url = "DelData.asp"; 
		objXMLHttpRequest.open("POST",Url,true);
		objXMLHttpRequest.setRequestHeader("Host","www.designonline.in");
		objXMLHttpRequest.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
		objXMLHttpRequest.setRequestHeader("Content-Length","12");
		objXMLHttpRequest.send(Para);
	}	
  }
  
  function Delete_POnclickOutput()
  {
	if(objXMLHttpRequest.readyState == "4" )	
	{
	
		var	MsgStr = objXMLHttpRequest.responseText.split("*");
		//document.getElementById("a").innerHTML = objXMLHttpRequest.responseText
			if(parseInt(MsgStr[1])==4)
			{
				document.location.href="photo.asp?output=1"
			}
			else if(parseInt(MsgStr[1])==5)
			{
				document.location.href="photo.asp?output=7"
			}
			else if(parseInt(MsgStr[1])==3)
			{
				document.location.href="photo.asp?output=3"
			}			
			else if(parseInt(MsgStr[1])==0)
			{
				document.location.href="photo.asp?output=4"
			}			
			else
			{
				document.location.href="photo.asp?output=5"				
			}

	}
  }   

function UplodHiRes(phid)
{
	Form = document.createElement("form");
	Form.name = "frmNews";
	Form.id = "frmNews";
	
	Input = document.createElement("input");	
	Input.type = "hidden";
	Input.name = "phid";
	Input.id = "phid";
	Input.value = phid;
	Form.appendChild(Input);

	document.body.appendChild(Form);
	Form.action = "addhiresphoto.asp";
	Form.method="post"
	Form.submit();
}

function VwConsultant(PhId)
{
	Form = document.createElement("form");
	Form.name = "frmSrch";
	Form.target="_blank"
	Form.id = "frmSrch";

	Input = document.createElement("input");
	Input.type = "hidden";
	Input.name = "AdId";
	Input.id = "AdId";
	Input.value = PhId;
	Form.appendChild(Input);
	
	document.body.appendChild(Form);
	Form.action = "view-consultant.asp";
	Form.target = "vwhires_"+PhId+":width={500},height={550},scrollbars,{(isResizable)?'resizable':''},status"
	
	Form.method="post"	
	Form.onSubmit = createTarget(Form);
	Form.submit();
}

function VwEnquiry(PhId)
{
	Form = document.createElement("form");
	Form.name = "frmSrch";
	Form.target="_blank"
	Form.id = "frmSrch";

	Input = document.createElement("input");
	Input.type = "hidden";
	Input.name = "EnqId";
	Input.id = "EnqId";
	Input.value = PhId;
	Form.appendChild(Input);
	
	document.body.appendChild(Form);
	Form.action = "view-inquiry.asp";
	Form.target = "vwenq_"+PhId+":width={500},height={500},scrollbars,{(isResizable)?'resizable':''},status"
	
	Form.method="post"	
	Form.onSubmit = createTarget(Form);
	Form.submit();
}
///////////////////////////////////
////////////////////////////////
var myHeight = 600;
var myWidt = 800;
var isResizable = false;

function createTarget(form) {
var _target = form.target;
_colon = _target.indexOf(":");
if(_colon != -1) 
{
	form.target = _target.substring(0,_colon);
	form.args = _target.substring(_colon+1);
} 
else if(typeof(form.args)=="undefined") {
	form.args = "";
}
if(form.args.indexOf("{")!=-1) {
_args = form.args.split("{");
form.args = _args[0];
for(var i = 1; i < _args.length;i++) {
_args[i] = _args[i].split("}");
form.args += eval(_args[i][0]) + _args[i][1];
   }
}
form.args = form.args.replace(/ /g,"");
_win = window.open('',form.target,form.args);
if(typeof(focus)=="function")
_win.focus();
return true;
}


function VwOrdr(phot)
{
	Form = document.createElement("form");
	Form.name = "frmSrch";
	//Form.target="_blank"
	Form.id = "frmSrch";

	Input = document.createElement("input");
	Input.type = "hidden";
	Input.name = "CrtId";
	Input.id = "CrtId";
	Input.value = phot;
	Form.appendChild(Input);
	
	document.body.appendChild(Form);
	Form.action = "vwimage_details.asp";
	//Form.target = "vwimages_"+phot+":width={myWidt},height={myHeight},scrollbars,{(isResizable)?'resizable':''},status"
	
	Form.method="post"	
	//Form.onSubmit = createTarget(Form);
	Form.submit();
}

function GenLnk(id,usr,trid)
{
	Para='PhId='+ id + '&CrtId=' + usr + '&TrCrtId=' + trid;	
	objXMLHttpRequest.onreadystatechange=GenLnk_Output;
	var Url = "GeneratLnk.asp"; 
	//var Url = "GeneratLnksAll.asp"; 
	objXMLHttpRequest.open("POST",Url,true);
	objXMLHttpRequest.setRequestHeader("Host","www.designonline.in");
	objXMLHttpRequest.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
	objXMLHttpRequest.setRequestHeader("Content-Length","12");
	objXMLHttpRequest.send(Para);
}
function GenLnk_Output()
{
	if(objXMLHttpRequest.readyState == "4" )	
	{	
		var	MsgStr = objXMLHttpRequest.responseText.split("***");
		document.getElementById("tst").innerHTML = objXMLHttpRequest.responseText
		//alert(objXMLHttpRequest.responseText)
		idval = MsgStr[1]
		//alert(idval)		
		document.getElementById("Gen_"+idval).innerHTML = MsgStr[2]				
	}
}   
function GenLnkAll(usr)
{
	Para='CrtId=' + usr ;	
	objXMLHttpRequest.onreadystatechange=GenLnkAll_Output;
	//var Url = "GeneratLnk.asp"; 
	var Url = "GeneratLnksAll.asp"; 
	objXMLHttpRequest.open("POST",Url,true);
	objXMLHttpRequest.setRequestHeader("Host","www.designonline.in");
	objXMLHttpRequest.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
	objXMLHttpRequest.setRequestHeader("Content-Length","12");
	objXMLHttpRequest.send(Para);
}
function GenLnkAll_Output()
{
	if(objXMLHttpRequest.readyState == "4" )	
	{	
		var	MsgStr = objXMLHttpRequest.responseText.split("***");
		var sndml
		sndml = MsgStr[1]
		document.getElementById("MlSnd_"+sndml).innerHTML = MsgStr[2]
		//alert(objXMLHttpRequest.responseText)
		//document.getElementById("Gen_"+idval).innerHTML = MsgStr[2]				
	}
}   

function StatsUpdt(Id,stat)
{	
	Para = GetPara()		
	if (Para) 
	{
		var stat
		var tbl
		//tbl = document.getElementById("TabNa").value;
		//tabNa = document.getElementById("TabNa").value;
		Para = Para + "&IdVal=" + Id + "&StatVal=" + stat //+ "&TabNa=" + tabNa;
		//alert(Para)
		objXMLHttpRequest.onreadystatechange=StatsUpdt_output;
		var Url = "Status_Srv.asp"; //Url of the file in the server.......
		objXMLHttpRequest.open("POST",Url,true);		
		objXMLHttpRequest.setRequestHeader("Host","www.designonline.in");
		objXMLHttpRequest.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
		objXMLHttpRequest.setRequestHeader("Content-Length","12");
		objXMLHttpRequest.send(Para); //Data - to be sent to the server......
	}		
}  
function StatsUpdt_output()
{
	if(objXMLHttpRequest.readyState == "4" )	
	{
		
		//document.getElementById("a").innerHTML = objXMLHttpRequest.responseText
		//alert(objXMLHttpRequest.responseText)
		var	MsgStr = objXMLHttpRequest.responseText.split("***");
		//id = MsgStr[1];
		statVl = MsgStr[2];
		//alert(statVl)	
		document.getElementById("Stat_"+MsgStr[1]).innerHTML = statVl;
		document.getElementById("AdStImg_"+MsgStr[1]).innerHTML = MsgStr[3];
		//document.location.href = "Admin.asp";			
	}
}
function GetTheDept()
{
	if(document.getElementById("NwTyp").value == "DEP")
	{
		if(document.getElementById("Dept").style.display == "block")
			document.getElementById("Dept").style.display = "none"
		else
			document.getElementById("Dept").style.display = "block";
	}
	else
		document.getElementById("Dept").style.display = "none"
}
function GetTheDeptPh()
{
	if(document.getElementById("PhTyp").value == "DEP")
	{
		if(document.getElementById("Dept").style.display == "block")
			document.getElementById("Dept").style.display = "none"
		else
			document.getElementById("Dept").style.display = "block";
	}
	else
		document.getElementById("Dept").style.display = "none"
}

//---------------add / modify 
function Addquestion()
{	
	Para = GetPara()
	if(Para)
	{
	//alert(Para)
	//alert(encodeURIComponent(document.form1.Question.value))
		objXMLHttpRequest.onreadystatechange = Addquestion_output;
		var Url = "Question_Srv.asp"; //Url of the file in the server.......
		objXMLHttpRequest.open("POST",Url,true);
		objXMLHttpRequest.setRequestHeader("Host","www.sec.ac.in");
		objXMLHttpRequest.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
		objXMLHttpRequest.setRequestHeader("Content-Length","12");
		objXMLHttpRequest.send(Para); //Data - to be sent to the server......
		document.getElementById("butSave").disabled = true;
	}

}
  
function Addquestion_output()
{
	if(objXMLHttpRequest.readyState == "4" )	
	{
		var	MsgStr = objXMLHttpRequest.responseText.split("*");
	document.getElementById("a").innerHTML = objXMLHttpRequest.responseText	
	/*	if(parseInt(MsgStr[1])==1)
		{
			document.location.href="Question.asp?output=1"
		}
		else if(parseInt(MsgStr[1])==2)
		{
			document.location.href="Question.asp?output=2"
		}		
		else
		{
			document.location.href="Question.asp?output=5"				
		}*/	
	}
}

function modiQuestion(adid)
{
	Form = document.createElement("form");
	Form.name = "form1";
	Form.id = "form1";
	
	Input = document.createElement("input");	
	Input.type = "hidden";
	Input.name = "QuesId";
	Input.id = "QuesId";
	Input.value = adid;
	Form.appendChild(Input);

	document.body.appendChild(Form);
	Form.action = "AddQuestion.asp";
	Form.method="post"
	Form.submit();
}

 //------------delete admin
   function Delete_questionOnclick(Id)
   {
	var VarChoic = confirm("Are you sure!.. want to delete");
	if(VarChoic)
	{
		Para=GetPara() + '&Id='+Id
	//	alert(Para)
  		objXMLHttpRequest.onreadystatechange=Delete_questionOnclickOutput;
		var Url = "DelData.asp"; 
		objXMLHttpRequest.open("POST",Url,true);
		objXMLHttpRequest.setRequestHeader("Host","www.designonline.in");
		objXMLHttpRequest.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
		objXMLHttpRequest.setRequestHeader("Content-Length","12");
		objXMLHttpRequest.send(Para);
	}	
  }
  
function Delete_questionOnclickOutput()
{
	if(objXMLHttpRequest.readyState == "4" )	
	{	
		var	MsgStr = objXMLHttpRequest.responseText.split("*");
		//document.getElementById("a").innerHTML = objXMLHttpRequest.responseText
		if(parseInt(MsgStr[1])==4)
		{
			document.location.href="Question.asp?output=1"
		}
		else if(parseInt(MsgStr[1])==5)
		{
			document.location.href="Question.asp?output=7"
		}
		else if(parseInt(MsgStr[1])==3)
		{
			document.location.href="Question.asp?output=3"
		}			
		else if(parseInt(MsgStr[1])==0)
		{
			document.location.href="Question.asp?output=4"
		}			
		else
		{
			document.location.href="Question.asp?output=5"				
		}
	}
} 
//---------addreplay-----------------------//
function Addreplay1()
{	
	Para = GetPara()
	if (Para)
	{
	//alert(Para)
		objXMLHttpRequest.onreadystatechange = Addreplay_output;
		var Url = "QuestionReplay_Srv.asp"; //Url of the file in the server.......
		objXMLHttpRequest.open("POST",Url,true);
		objXMLHttpRequest.setRequestHeader("Host","www.sec.ac.in");
		objXMLHttpRequest.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
		objXMLHttpRequest.setRequestHeader("Content-Length","12");
		objXMLHttpRequest.send(Para); //Data - to be sent to the server......
		document.getElementById("butSave").disabled = true;
	}

}
  
function Addreplay_output1()
{
	if(objXMLHttpRequest.readyState == "4" )	
	{
		var	MsgStr = objXMLHttpRequest.responseText.split("*");
	document.getElementById("a").innerHTML = objXMLHttpRequest.responseText	
		if(parseInt(MsgStr[1])==1)
		{
			document.location.href="QuestionReplay.asp?output=1"
		}
		else if(parseInt(MsgStr[1])==2)
		{
			document.location.href="QuestionReplay.asp?output=2"
		}		
		else
		{
			document.location.href="QuestionReplay.asp?output=5"				
		}	
	}
}

function modiQuestion1(adid)
{
	Form = document.createElement("form");
	Form.name = "form1";
	Form.id = "form1";
	
	Input = document.createElement("input");	
	Input.type = "hidden";
	Input.name = "QuesId";
	Input.id = "QuesId";
	Input.value = adid;
	Form.appendChild(Input);

	document.body.appendChild(Form);
	Form.action = "AddQuestion.asp";
	Form.method="post"
	Form.submit();
}

function Search_CatAll(pgid)
{
	Form = document.createElement("form");
	Form.name = "form1";
	Form.id = "form1";
	
	Input = document.createElement("input");	
	Input.type = "hidden";
	Input.name = "mypage";
	Input.id = "mypage";
	Input.value = pgid;
	Form.appendChild(Input);

	document.body.appendChild(Form);
	Form.action = "media-corner.asp";
	Form.method="post"
	Form.submit();
//mypage
}


function Search_MediaadmAll(pgid)
{
	Form = document.createElement("form");
	Form.name = "form1";
	Form.id = "form1";
	
	Input = document.createElement("input");	
	Input.type = "hidden";
	Input.name = "mypage";
	Input.id = "mypage";
	Input.value = pgid;
	Form.appendChild(Input);

	document.body.appendChild(Form);
	Form.action = "media.asp";
	Form.method="post"
	Form.submit();
//mypage
}


function Search_NewsadmAll(pgid)
{
	Form = document.createElement("form");
	Form.name = "form1";
	Form.id = "form1";
	
	Input = document.createElement("input");	
	Input.type = "hidden";
	Input.name = "mypage";
	Input.id = "mypage";
	Input.value = pgid;
	Form.appendChild(Input);

	document.body.appendChild(Form);
	Form.action = "news-events.asp";
	Form.method="post"
	Form.submit();
//mypage
}


function Search_photoadmAll(pgid)
{
	Form = document.createElement("form");
	Form.name = "form1";
	Form.id = "form1";
	
	Input = document.createElement("input");	
	Input.type = "hidden";
	Input.name = "mypage";
	Input.id = "mypage";
	Input.value = pgid;
	Form.appendChild(Input);

	document.body.appendChild(Form);
	Form.action = "PhotoGallery.asp";
	Form.method="post"
	Form.submit();
//mypage
}




function Search_arciveAll(pgid)
{
	Form = document.createElement("form");
	Form.name = "frmArch";
	Form.id = "frmArch";

	Input = document.createElement("input");	
	Input.type = "hidden";
	Input.name = "mypage";
	Input.id = "mypage";
	Input.value = pgid;
	Form.appendChild(Input);

	document.body.appendChild(Form);
	Form.action = "archive.asp";
	Form.method="post"
	Form.submit();

}

function chkEnterKey(evnt)
{
//alert(evnt)
	if(evnt==13)
	{
		login();
	}
}

function GetNewsAdm(nid)
{
	Form = document.createElement("form");
	Form.name = "form1";
	Form.id = "form1";
	
	Input = document.createElement("input");	
	Input.type = "hidden";
	Input.name = "NwId";
	Input.id = "NwId";
	Input.value = nid;
	Form.appendChild(Input);

	document.body.appendChild(Form);
	Form.action = "view-news.asp";
	Form.method="post"
	Form.submit();
}
function sndMail(adm)
{
	Form = document.createElement("form");
	Form.name = "form1";
	Form.id = "form1";
	
	Input = document.createElement("input");	
	Input.type = "hidden";
	Input.name = "ToMail";
	Input.id = "ToMail";
	Input.value = adm;
	Form.appendChild(Input);

	document.body.appendChild(Form);
	Form.action = "compose.asp";
	Form.method="post"
	Form.submit();
}
function Search_ProjectsadmAll(pgid)
{
	Form = document.createElement("form");
	Form.name = "form1";
	Form.id = "form1";
	
	Input = document.createElement("input");	
	Input.type = "hidden";
	Input.name = "mypage";
	Input.id = "mypage";
	Input.value = pgid;
	Form.appendChild(Input);

	document.body.appendChild(Form);
	Form.action = "admin.asp";
	Form.method="post"
	Form.submit();
//mypage
}
function Search_ConsultantsAll(pgid)
{
	Form = document.createElement("form");
	Form.name = "form1";
	Form.id = "form1";
	
	Input = document.createElement("input");	
	Input.type = "hidden";
	Input.name = "mypage";
	Input.id = "mypage";
	Input.value = pgid;
	Form.appendChild(Input);

	document.body.appendChild(Form);
	Form.action = "Consultants.asp";
	Form.method="post"
	Form.submit();
//mypage
}
function Search_InquiryAll(pgid)
{
	Form = document.createElement("form");
	Form.name = "form1";
	Form.id = "form1";
	
	Input = document.createElement("input");	
	Input.type = "hidden";
	Input.name = "mypage";
	Input.id = "mypage";
	Input.value = pgid;
	Form.appendChild(Input);

	document.body.appendChild(Form);
	Form.action = "usrreport.asp";
	Form.method="post"
	Form.submit();
//mypage
}

function getThsAdm()
{
	Form = document.createElement("form");
	Form.name = "form1";
	Form.id = "form1";
	
	Input = document.createElement("input");	
	Input.type = "hidden";
	Input.name = "user";
	Input.id = "user";
	Input.value = document.getElementById("AdName").value;
	Form.appendChild(Input);

	document.body.appendChild(Form);
	Form.action = "usrreport.asp";
	Form.method="post"
	Form.submit();
}
function getThsAdmEnq(enq)
{
	Form = document.createElement("form");
	Form.name = "form1";
	Form.id = "form1";
	
	Input = document.createElement("input");	
	Input.type = "hidden";
	Input.name = "user";
	Input.id = "user";
	Input.value = enq;
	Form.appendChild(Input);

	document.body.appendChild(Form);
	Form.action = "usrreport.asp";
	Form.method="post"
	Form.submit();
}
function getThsStat()
{
	Form = document.createElement("form");
	Form.name = "form1";
	Form.id = "form1";
	
	Input = document.createElement("input");	
	Input.type = "hidden";
	Input.name = "state";
	Input.id = "state";
	Input.value = document.getElementById("StateId").value;
	Form.appendChild(Input);

	document.body.appendChild(Form);
	Form.action = "usrreport.asp";
	Form.method="post"
	Form.submit();
}
function getSubmitto()
{
	Para = "AdCatId=" + document.getElementById("AdcatId").value;
	objXMLHttpRequest.onreadystatechange = getSubmitto_output;
	var Url = "submitto_Srv.asp"; //Url of the file in the server.......
	objXMLHttpRequest.open("POST",Url,true);
	objXMLHttpRequest.setRequestHeader("Host","www.sec.ac.in");
	objXMLHttpRequest.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
	objXMLHttpRequest.setRequestHeader("Content-Length","12");
	objXMLHttpRequest.send(Para); //Data - to be sent to the server......
	//document.getElementById("butSave").disabled = true;
}
  
function getSubmitto_output()
{
	if(objXMLHttpRequest.readyState == "4" )	
	{
		//var	MsgStr = objXMLHttpRequest.responseText.split("*");
		document.getElementById("Submitto").innerHTML = objXMLHttpRequest.responseText;
		objXMLHttpRequest.abort();		
	}
}
function GetDispla(adm)
{
	Form = document.createElement("form");
	Form.name = "form1";
	Form.id = "form1";
	
	Input = document.createElement("input");	
	Input.type = "hidden";
	Input.name = "AdId";
	Input.id = "AdId";
	Input.value = adm;
	Form.appendChild(Input);

	document.body.appendChild(Form);
	Form.action = "Consultants.asp";
	Form.method="post"
	Form.submit();
}
function AddConsult(adm)
{
	Form = document.createElement("form");
	Form.name = "form1";
	Form.id = "form1";
	
	Input = document.createElement("input");	
	Input.type = "hidden";
	Input.name = "SubmId";
	Input.id = "SubmId";
	Input.value = adm;
	Form.appendChild(Input);

	document.body.appendChild(Form);
	Form.action = "AddConsult.asp";
	Form.method="post"
	Form.submit();
}
function VwHid()
{
	if(document.getElementById("AdCatId").value == "2")
	{		
		document.getElementById("PermSet").style.display = "none";
		document.getElementById("UpdtVP").style.display = "none";
		document.getElementById("UpdtCons").style.display = "block";		
	}
	else
	{	
		document.getElementById("PermSet").style.display = "block";
		document.getElementById("UpdtCons").style.display = "none";	
		document.getElementById("UpdtVP").style.display = "block";
	}
}