/*                                                  */
/* 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=6,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=6,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){
	$('#back').before('<div id="alert" class="jqmWindow"><br /><h2 class="alertTitle" align="center">Alert</h2><div class="alertContent" align="center">Alert content</div><p align="center"><a class="jqmClose button" href="#">Close</a></p></div>');
	$('#alert').jqm({overlay:66,modal:true,trigger:false}).jqmShow().find('h2.alertTitle').html(title).end().find('div.alertContent').html(error);
	
}

function alertMsg2(title,error){
	$('#nhnback').before('<div id="alert" class="jqmWindow2"><br /><h2 class="alertTitle" align="center">Alert</h2><div class="alertContent" align="center">Alert content</div><p align="center"><a class="jqmClose button3" href="#">Close</a></p></div>');
	$('#alert').jqm({overlay:66,modal:true,trigger:false}).jqmShow().find('h2.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);
}


/***********************************************
* Basic Calendar-By Brian Gosselin at http://scriptasylum.com/bgaudiodr/
* Script featured on Dynamic Drive (http://www.dynamicdrive.com)
* This notice must stay intact for use
* Visit http://www.dynamicdrive.com/ for full source code
***********************************************/

function buildCal(m, y, cM, cH, cDW, cD){
var dim=[31,0,31,30,31,30,31,31,30,31,30,31];

var oD = new Date(y, m-1, 1); //DD replaced line to fix date bug when current day is 31st
oD.od=oD.getDay()+1; //DD replaced line to fix date bug when current day is 31st

var todaydate=new Date() //DD added
var scanfortoday=(y==todaydate.getFullYear() && m==todaydate.getMonth()+1)? todaydate.getDate() : 0 //DD added

dim[1]=(((oD.getFullYear()%100!=0)&&(oD.getFullYear()%4==0))||(oD.getFullYear()%400==0))?29:28;
var t='<div class="'+cM+'"><table class="'+cM+'" cols="7" cellpadding="0" cellspacing="0">';
t+='<tr align="center">';
for(s=0;s<7;s++)t+='<td class="'+cDW+'">'+"SMTWTFS".substr(s,1)+'</td>';
t+='</tr><tr align="center">';
for(i=1;i<=42;i++){
var x=((i-oD.od>=0)&&(i-oD.od<dim[m-1]))? i-oD.od+1 : '&nbsp;';
if (x==scanfortoday) //DD added
x='<span id="today">'+x+'</span>' //DD added
t+='<td class="'+cD+'">'+x+'</td>';
if(((i)%7==0)&&(i<36))t+='</tr><tr align="center">';
}
return t+='</tr></table></div>';
}

var todaydate=new Date()
var curmonth //get current month (1-12)
var curyear=todaydate.getFullYear() //get current year