/*                                                  */
/* Function to insert flash media                   */
/*                                                  */

function showflash(filename,width,height)
{
   
   if(filename=='cover')
   {
      document.write("<object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0' width='"+width+"' height='"+height+"' id='"+filename+"' align='middle'>");
      document.write("<param name='allowScriptAccess' value='sameDomain' />");
      document.write("<param name='movie' value='"+filename+".swf' />");
      document.write("<param name='loop' value='false' />");
      document.write("<param name='menu' value='false' />");
      document.write("<param name='quality' value='high' />");
      document.write("<param name='wmode' value='transparent' />");
      document.write("<param name='scale' value='exactfit' />");
      document.write("<param name='bgcolor' value='#ffffff' />");
      document.write("<embed src='"+filename+".swf' loop='false' menu='false' quality='high' scale='exactfit' wmode='transparent' bgcolor='#ffffff' width='"+width+"' height='"+height+"' name='"+filename+"' align='middle' allowScriptAccess='sameDomain' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer' />");
      document.write("</object>");

   }else{
      document.write("<object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0' width='"+width+"' height='"+height+"' id='"+filename+"' align='middle'>");
      document.write("<param name='allowScriptAccess' value='sameDomain' />");
      document.write("<param name='movie' value='"+filename+".swf' />");
      document.write("<param name='loop' value='false' />");
      document.write("<param name='menu' value='false' />");
      document.write("<param name='quality' value='high' />");
      document.write("<param name='wmode' value='transparent' />");
      document.write("<param name='bgcolor' value='#ffffff' />");
      document.write("<embed src='"+filename+".swf' loop='false' menu='false' quality='high' wmode='transparent' bgcolor='#ffffff' width='"+width+"' height='"+height+"' name='"+filename+"' align='middle' allowScriptAccess='sameDomain' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer' />");
      document.write("</object>");
   }
}

function showflash2(filename,width,height)
{
   
   if(filename=='cover')
   {
      document.write("<object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0' width='"+width+"' height='"+height+"' id='"+filename+"' align='middle'>");
      document.write("<param name='allowScriptAccess' value='sameDomain' />");
      document.write("<param name='movie' value='"+filename+".swf' />");
      document.write("<param name='loop' value='true' />");
      document.write("<param name='menu' value='false' />");
      document.write("<param name='quality' value='high' />");
      document.write("<param name='wmode' value='transparent' />");
      document.write("<param name='scale' value='exactfit' />");
      document.write("<param name='bgcolor' value='#ffffff' />");
      document.write("<embed src='"+filename+".swf' loop='true' menu='false' quality='high' scale='exactfit' wmode='transparent' bgcolor='#ffffff' width='"+width+"' height='"+height+"' name='"+filename+"' align='middle' allowScriptAccess='sameDomain' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer' />");
      document.write("</object>");

   }else{
      document.write("<object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0' width='"+width+"' height='"+height+"' id='"+filename+"' align='middle'>");
      document.write("<param name='allowScriptAccess' value='sameDomain' />");
      document.write("<param name='movie' value='"+filename+".swf' />");
      document.write("<param name='loop' value='true' />");
      document.write("<param name='menu' value='false' />");
      document.write("<param name='quality' value='high' />");
      document.write("<param name='wmode' value='transparent' />");
      document.write("<param name='bgcolor' value='#ffffff' />");
      document.write("<embed src='"+filename+".swf' loop='true' menu='false' quality='high' wmode='transparent' bgcolor='#ffffff' width='"+width+"' height='"+height+"' name='"+filename+"' align='middle' allowScriptAccess='sameDomain' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer' />");
      document.write("</object>");
   }
}

function showflash3(filename,width,height,cid)
{
   
   if(filename=='cover')
   {
      document.write("<object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0' width='"+width+"' height='"+height+"' id='"+filename+"' align='middle'>");
      document.write("<param name='allowScriptAccess' value='always' />");
      document.write("<param name='movie' value='"+filename+".swf' />");
      document.write("<param name='loop' value='false' />");
	  document.write("<param name='flashvars' value='cid="+cid+"' />");
      document.write("<param name='menu' value='false' />");
      document.write("<param name='quality' value='high' />");
      document.write("<param name='wmode' value='transparent' />");
      document.write("<param name='scale' value='exactfit' />");
      document.write("<param name='bgcolor' value='#ffffff' />");
      document.write("<embed src='"+filename+".swf' flashvars='cid="+cid+"' loop='false' menu='false' quality='high' scale='exactfit' wmode='transparent' bgcolor='#ffffff' width='"+width+"' height='"+height+"' name='"+filename+"' align='middle' allowScriptAccess='always' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer' />");
      document.write("</object>");

   }else{
      document.write("<object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0' width='"+width+"' height='"+height+"' id='"+filename+"' align='middle'>");
      document.write("<param name='allowScriptAccess' value='always' />");
      document.write("<param name='movie' value='"+filename+".swf' />");
      document.write("<param name='loop' value='false' />");
	  document.write("<param name='flashvars' value='cid="+cid+"' />");
      document.write("<param name='menu' value='false' />");
      document.write("<param name='quality' value='high' />");
      document.write("<param name='wmode' value='transparent' />");
      document.write("<param name='bgcolor' value='#ffffff' />");
      document.write("<embed src='"+filename+".swf' flashvars='cid="+cid+"' loop='false' menu='false' quality='high' wmode='transparent' bgcolor='#ffffff' width='"+width+"' height='"+height+"' name='"+filename+"' align='middle' allowScriptAccess='always' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer' />");
      document.write("</object>");
   }
}


function support() 
{ 
    newin=window.open("parature_jump.php","paraturewin","width=1000,height=650,toolbar=1,scrollbars=1,resizable=1");
    newin.focus();
}

function alertMsg(title,error){
	$('#alert').jqm({overlay:66,modal:true,trigger:false}).jqmShow().find('p.alertTitle').html(title).end().find('div.alertContent').html(error);
	
}

function windowPop(url,title,height,width,scrollbar) { 
    var str = "height="+height+",innerHeight="+height;
    str += ",width="+width+",innerWidth="+width+",scrollbars="+scrollbar;
    if (window.screen) {
        var ah = screen.availHeight - 30;
        var aw = screen.availWidth - 10;
        var xc = (aw - width) / 2;
        var yc = (ah - height) / 2;

        str += ",left=" + xc + ",screenX=" + xc;
        str += ",top=" + yc + ",screenY=" + yc;
    }
    window.open(url, title, str);
}