﻿function setCookie(name, value) {
   var today = new Date()
   var expires = new Date()
   expires.setTime(today.getTime() + 1000*60*60*24*365)
   document.cookie = name + "=" + escape(value)    + "; expires=" + expires.toGMTString()
}

function getCookie(Name) {
  var search = Name + "="
  if(document.cookie.length > 0) {
    offset = document.cookie.indexOf(search)
    if(offset != -1) {
      offset += search.length
      end = document.cookie.indexOf(";", offset)
      if(end == -1) end = document.cookie.length
      return unescape(document.cookie.substring(offset, end))
    }
    else return ""
  }
}
function allcheck(name,obj){
var getname=document.getElementsByName(name);
for (var i=0;i<getname.length;i++){
getname[i].checked=obj.checked;	
}
}
function opennew(url,name,width,height,top,left){ 
if(document.all){ 
showModelessDialog(url,name,"dialogWidth:"+width+"px;dialogHeight:"+height+"px;dialogLeft:"+top+"px;dialogTop:"+left+"px;center:yes;help:no;resizable:no;status:no;scroll:no;"); 
}else{ 
window.open(url,name,"status=no,helpIcon=no,location=no,toolbar=no,menubar=no,maxnimize=no,systemMenu=no,resizable=no,scrollbars=no,width="+width+",height="+height+",top="+top+",left="+left+"");} 
}


function showflash(name,swf,width,height,bgcolor){ 
if(bgcolor==null||bgcolor==""){var transparent="opaque"}else{var transparent="transparent"}
var showtext="<object classid=\"clsid:d27cdb6e-ae6d-11cf-96b8-444553540000\" codebase=\"http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0\" width=\""+width+"\" height=\""+height+"\" id=\""+name+"\" align=\"middle\">\n"; 
showtext=showtext+"<param name=\"allowScriptAccess\" value=\"sameDomain\" />\n"; 
showtext=showtext+"<param name=\"movie\" value=\""+swf+"\" />\n"; 
showtext=showtext+"<param name=\"menu\" value=\"false\" />\n"; 
showtext=showtext+"<param name=\"quality\" value=\"high\" />\n"; 
showtext=showtext+"<param name=\"scale\" value=\"exactfit\" />\n"; 
showtext=showtext+"<param name=\"wmode\" value=\""+transparent+"\" />\n"; 
showtext=showtext+"<param name=\"bgcolor\" value=\""+bgcolor+"\" />\n"; 
showtext=showtext+"<embed src=\""+swf+"\" menu=\"false\" quality=\"high\" scale=\"exactfit\" wmode=\""+transparent+"\" bgcolor=\""+bgcolor+"\" width=\""+width+"\" height=\""+height+"\" name=\""+name+"\" align=\"middle\" allowScriptAccess=\"sameDomain\" type=\"application/x-shockwave-flash\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" />\n"; 
showtext=showtext+"</object>\n"; 
document.write (showtext); 
}
