

var divtemp;
var strWidth="1003px";
//var strHeight="1600px";

function popUpwithheight(divpopup,ifrid,ifrsrc,ifrheight) 
{  
		
	var div; 
   	div = document.getElementById(divpopup); 
	div.style.display="block";
	var X=0;
    var Y=0;;
    // X = X + 325;  
    Y=Y+130;
    var win_width=screen.width;
    var win_height=screen.height;
   
    X = (parseInt(win_width) / 2) - 160;

   	// Sets the position of the DIV 
    if(div.style.left=="")
    {
        div.style.left = X+'px';
        div.style.top = Y+'px';     
        div.style.borderStyle="solid";
        div.style.borderColor="#8C8E8C";     
        div.style.borderWidth="1px";  
    }
	
	
	DisablePage(ifrid,ifrsrc);
	document.getElementById(ifrid).src=ifrsrc;	
	document.getElementById(ifrid).height=ifrheight+'px';

    return false;
} 	

		
function closePopup(divpopup)
{
	window.parent.document.getElementById(divpopup).style.display="none";
	window.parent.document.getElementById("divIdName").style.display="none";

    /* for the page only */
	 	 
    /* for the page only */
    return false;
}


        	
		
function popUp(divpopup,ifrid,ifrsrc) 
{ 
			
	//document.getElementById(ifrid).src=ifrsrc;	
	var div; 
   	div = document.getElementById(divpopup); 
	div.style.display="block";
	var X=0;
	var Y=0;;
	X = X + 325;  
	Y=Y+70;
    // Sets the position of the DIV 
	if(div.style.left=="")
	{
    	div.style.left = X+'px';
    	div.style.top = Y+'px';
	}
	//alert(document.getElementById(ifrid).src);
			
	DisablePage(ifrid,ifrsrc);
	document.getElementById(ifrid).src=ifrsrc;
    document.getElementById(ifrid).height='240px';	
    return false;
} 
		
function DisablePage(ifrid,ifrsrc)
{       
      
    if(divtemp==undefined)
    {
		divtemp = document.createElement("div");
		 
        divtemp.style.top = "0";
        divtemp.style.left = "0";
		/* for the page only */
		if(screen.width<=800 && navigator.appName.toLowerCase().indexOf("internet explorer")!=-1)
		{
			divtemp.style.width="130%";
		}
		
		//alert(document.body.clientWidth);
		
		if(document.body.clientWidth)
		{}	
				
		/* for the page only */
				
        // divtemp.style.height = strHeight;
  		divtemp.style.height = (document.body.scrollHeight+50)+'px';

 		if (navigator.appName.toLowerCase().indexOf("internet explorer")!=-1) // for IE
     	{
			divtemp.style.position = "absolute";
		}
		else
		{
			divtemp.style.position = "fixed";
		}

        // divtemp.style.width =strWidth;
		//divtemp.style.position = "absolute";
        divtemp.id = "divIdName";
        divtemp.className = 'disablePage';
        var arrbody = document.getElementsByTagName("body");
        arrbody[0].appendChild(divtemp);
				
		//document.getElementById(ifrid).src=ifrsrc;	
    }
    else
    {
                
        //divtemp.style.width =strWidth;
		/* for the page only */
		
		document.getElementById("divIdName").style.display="block";
				
		/* for the page only */
    }
}

function openurlwindow(url)
{
    window.location.href=url;
}


