function embedMyFlash(wi,he,link, realflversion,allowedflver,pcconfiglink)
{

 if(realflversion<allowedflver){
       document.write(pcconfiglink);
   }
 else  document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" \
        width="'+wi+'" \
        height="'+he+'" \
        id="game"> \
        <param name="movie" value="'+link+'" /> \
        <param name="allowScriptAccess" value="always" />  \
        <param name="quality" value="high" /><param name="wmode" value="transparent" />  \
        <embed src="'+link+'" \
               quality="high" wmode="transparent" \
               width="'+wi+'" \
               height="'+he+'" \
               name="game" \
               allowScriptAccess="always" \
               type="application/x-shockwave-flash" /> \
	</object>');
  }
  
function embedMyBanner(wi,he,link, realflversion, allowedflver,pcconfiglink){
   if(realflversion<allowedflver){
       document.write(pcconfiglink);
   }
   else document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" \
        width="'+wi+'" \
        height="'+he+'" \
        id="banner"> \
        <param name="movie" value="'+link+'" /> \
        <param name="quality" value="high" /><param name="allowScriptAccess" value="always"><param name="wmode" value="transparent" /> \
        <param name="menu" value="false"/><embed src="'+link+'" \
               quality="high" wmode="transparent" menu="false" \
               width="'+wi+'" \
               height="'+he+'" \
               name="game" \
			   allowScriptAccess="always" \
               type="application/x-shockwave-flash" /> \
	</object>');
  }
  
 
  
function embedMyFlash2(wi,he,link)
{
  document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" \
        width="'+wi+'" \
        height="'+he+'" \
        id="game"> \
        <param name="movie" value="'+link+'" /> \
        <param name="quality" value="high" /> \
        <embed src="'+link+'" \
               quality="high" \
               width="'+wi+'" \
               height="'+he+'" \
               name="game" \
               type="application/x-shockwave-flash" /> \
	</object>');
  }
  
  function openWindow(link, windowName, params)
{
        try{
            var dmn= document.domain.substring(document.domain.indexOf(".")+1);
            document.domain = dmn;
        }catch (exception){
            // do nothing.
	}
        
	try
	{
            window.open(link, windowName, params);
        }
	catch (exception)
	{
            // do nothing.
	}
}

function openWindowRegDep(link, windowName, params)
{
        try{
            var dmn= document.domain.substring(document.domain.indexOf(".")+1);
            document.domain = dmn;
        }catch (exception){
            // do nothing.
	}
        
	try
		{
			width = window.screen.availWidth;
			height = window.screen.availHeight;
		}
		catch (e)
		{
			width = window.screen.width;
			height = window.screen.height;
		}
	xpoint=(width/2)-356; //ie +12.+31  firefox +8.+81 window margins
	ypoint=(height/2)-330;
	//alert('open window at coordinates:'+xpoint+' '+ypoint);
	try
	{
		window.open(link, windowName, params+',left='+xpoint+',top='+ypoint);
		//_openWindow(link, 'GameWindow', 'auto', 'auto', width, height, 'no', 'no', 'no', 'yes', 'x', 'no', 'no', windowName);
	}
	catch (exception)
	{
		// do nothing.
	}
}
