function Open_PopupResponse(intValue,IsVideo)
	{
		 var ScreenWidth=window.screen.width;
	   	 var ScreenHeight=window.screen.height;
		 var movefromedge=0;
		 placementx=(ScreenWidth/2)-((300)/2);
		 placementy=(ScreenHeight/2)-((400+50)/2);
	     address = "Show_AddResponse.asp?DynamicContentID=" + intValue + "&IsVideo=" + IsVideo
	     prm = "width=300,height=450,toolbar=0,location=0,directories=0,status=1,scrollbars=auto,menubar=0,resizable=1,left="+placementx+",top="+placementy+",screenX="+placementx+",screenY="+placementy+","
	     WinPop=window.open(address,'window1',prm);
	}
	
	
	
	function Open_PopupPrint(DynamicContentID)
	{
		 var ScreenWidth=window.screen.width;
	   	 var ScreenHeight=window.screen.height;
		 var movefromedge=0;
		 placementx=(ScreenWidth/2)-((550)/2);
		 placementy=(ScreenHeight/2)-((600+50)/2);
	     address = "Show_Article_Print.asp?DynamicContentID=" + DynamicContentID
	     prm = "width=550,height=600,toolbar=0,location=0,directories=0,status=1,scrollbars=auto,menubar=0,resizable=1,left="+placementx+",top="+placementy+",screenX="+placementx+",screenY="+placementy+","
	     WinPop=window.open(address,'window1',prm);
	}	
	
		
	
	function SwitchMenu(obj)
	{
	try{
		
		if (document.all('sub_' + obj).style.display == 'none')
			{
			//alert('true');
			document.all('sub_' + obj).style.display = '';
			document.all('img_' + obj).src = 'imgs/BTNOpen.gif';
			//document.all('img_' + obj).alt = '1';

			}
		else
			{
			//alert('false');
			document.all('sub_' + obj).style.display = 'none';
			document.all('img_' + obj).src = 'imgs/BTNClose.gif';
			//document.all('img_' + obj).alt = '1';
			}
		}
	catch(e){}
	}
	
	
	
	
function Open_ForgotPassword()
	{
		 var ScreenWidth=window.screen.width;
	   	 var ScreenHeight=window.screen.height;
		 var movefromedge=0;
		 placementx=(ScreenWidth/2)-((300)/2);
		 placementy=(ScreenHeight/2)-((400+50)/2);
	     address = "BlogForgotPassword.asp"
	     prm = "width=278,height=200,toolbar=0,location=0,directories=0,status=1,scrollbars=auto,menubar=0,resizable=1,left="+placementx+",top="+placementy+",screenX="+placementx+",screenY="+placementy+","
	     WinPop=window.open(address,'window1',prm);
	}	
	
	
function Open_VideoGenerator(intVideo,ihp)
	{
		 var ScreenWidth=window.screen.width;
	   	 var ScreenHeight=window.screen.height;
		 var movefromedge=0;
		 placementx=(ScreenWidth/2)-((300)/2);
		 placementy=(ScreenHeight/2)-((400+50)/2);
	     address = "../VideoGenerator.asp?intVideo=" + intVideo + "&ihp=" + ihp
	     prm = "width=300,height=200,toolbar=0,location=0,directories=0,status=1,scrollbars=auto,menubar=0,resizable=1,left="+placementx+",top="+placementy+",screenX="+placementx+",screenY="+placementy+","
	     WinPop=window.open(address,'window1',prm);
	}	
	
	
	//-------------------------------------------------------------------------------
//get Banner from response	
var xmlHttp

function GetXmlHttpObject()
{ 
	var objXMLHttp=null
	if (window.XMLHttpRequest)
	{
		objXMLHttp=new XMLHttpRequest()
	}
	else if (window.ActiveXObject)
	{
		objXMLHttp=new ActiveXObject("Microsoft.XMLHTTP")
	}
	
	return objXMLHttp
}

//-------------------------------------------------------------------------------
function SwitchMenuAjax(str)
{
	//alert(str)
	//alert(strResLooper)
	xmlHttp=GetXmlHttpObject()
	//MOZILA
	if (window.XMLHttpRequest) {
        xmlHttp = new XMLHttpRequest();
    }
    // IE
    else if (window.ActiveXObject) {
        xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
    }
	if (xmlHttp==null)
	{
		alert ("Browser does not support HTTP Request")
		return
	} 
	//STR = CityID
	//var IsOpen
	//IsOpen = document.all('sub_' + str).title;
	if (document.all('sub_' + str).style.display == 'none') {
	//If currently Closed
		var url="/GetUserResponse.asp"
		url=url+"?ResponseID=" + str 
		url=url+"&sid="+Math.random()
		xmlHttp.onreadystatechange=stateChanged 
		xmlHttp.open("GET",url,true)
		xmlHttp.send(null)
	}
	else
	{
    //If currently Open
			SwitchMenu(str);
	}
}
function stateChanged() 
{ 
	if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
	{ 
		//alert(str);
	    var resText = xmlHttp.responseText;
		//var PlaceId = resText.charAt(0);
		var ResArray = resText.split("|");
		var PlaceId = ResArray[0];
		//alert('PlaceId:'+PlaceId);
		var wholeHTML = ResArray[1];
		//var wholeHTML = resText.substring(1,lenght(resText)-1);// mid(resText,1,length(resText)-1)
		//alert('wholeHTML:'+wholeHTML);
		document.all('sub_' + PlaceId).innerHTML=wholeHTML;
		//document.all('sub_' + PlaceId).style.display = '';
				
		if (document.all('sub_' + PlaceId).style.display == '')
		{
			//alert('true');
			document.all('sub_' + PlaceId).style.display = 'none';
		}
		else
		{
			//alert('false');
			document.all('sub_' + PlaceId).style.display = '';
		
		}
		
	
		//document.getElementById("Responce" + PlaceId).innerHTML=wholeHTML;
	} 
} 
		
	
	
	
