var popupStatus = 0;
function popreg()
{
	if(popupStatus==0)
	{
		$("#backgroundPopup").css({
				"opacity": "0.7"
				});
		$("#backgroundPopup").fadeIn("fast");	
		$("#popUp").fadeIn("slow");
		var windowWidth = document.documentElement.clientWidth;
		var windowHeight = document.documentElement.clientHeight;
		var popupHeight = $("#popUp").height();
		var popupWidth = $("#popUp").width();
		//var oleft = getElementPos(document.getElementById("flash_spot1"));
		$("#popUp").css({
		"position": "absolute",
		"left": windowWidth/2-popupWidth/2
		//"left": oleft[0] - 390,
		//"top": oleft[1] - 100
		});
		document.getElementById("popLeft").innerHTML=document.getElementById("main_left").innerHTML;
		document.getElementById("main_left").innerHTML="";
		$("#flash_spot1").hide();	
		$("#capn").hide();
		popupStatus = 1;
	}
}
function closereg()
{	
	if(popupStatus==1)
	{
		document.getElementById("main_left").innerHTML=document.getElementById("popLeft").innerHTML;
		$("#flash_spot1").show();
		$("#capn").show();
		$("#backgroundPopup").fadeOut("fast");
		$("#popUp").fadeOut("fast");	
		document.getElementById("popLeft").innerHTML="";
		popupStatus = 0;
	}
}
function getElementPos(obj)   
{   
    var left = 0;   
    var top = 0;   
  
    if(obj.x)   
    {   
        left= obj.x;   
        top = obj.y;   
    }else if(obj.offsetParent)   
    {      
        while(obj.offsetParent)   
        {          
            left += obj.offsetLeft;   
            top  += obj.offsetTop;   
            obj = obj.offsetParent;   
        }    
    }   
  
    return [left,top];   
}

function change_flash(url)
{
	 var IE = navigator.appName.indexOf("Microsoft") != -1;
     if (IE)
     {
		 flash_movie_obj.movie=url;
     }
	 else
	{
		 document.embeds.flash_movie.LoadMovie(0, url);
	 }
}