// JavaScript Document
function idle(){return false}

function findObj(o,d){var p,i,n;if(!d)d=document;if((p=o.indexOf("?"))>0&&parent.frames.length){d=parent.frames[o.substring(p+1)].document;o=o.substring(0,p);}if(!(n=d[o])&&d.all)n=d.all[o];for(i=0;!n&&i<d.forms.length; i++)n=d.forms[i][o];for(i=0;!n&&d.layers&&i<d.layers.length;i++) n=findObj(o,d.layers[i].document);if(!n&&document.getElementById)n=document.getElementById(o);return n;}

function preImg(){var d=document,i,a=preImg.arguments;if(d.images){if(!d.imgArr)d.imgArr=new Array();var j=d.imgArr.length;for(i=0;i<a.length;i++){if(a[i].indexOf("#")!=0){d.imgArr[j]=new Image;d.imgArr[j++].src=a[i];}}}}

function swapImg(){var i,j=0,x,a=swapImg.arguments;document.sr=new Array;for(i=0;i<(a.length-2);i+=3)if ((x=findObj(a[i]))!=null){document.sr[j++]=x;if(!x.oSrc)x.oSrc=x.src;x.src=a[i+2];}}

function swapImgRestore(){var i,x,a=document.sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++)x.src=x.oSrc;}

function dw(c){ return (c)?document.writeln(c):false; }

function ow(u,w,h,t,s,c){var d=document,n="",nw,f;t=t?"yes":"no"; s=s?"yes":"no";f="toolbar="+t+",menubar="+t+",location="+t+",status="+t+",scrollbars="+s+",resizable="+s;if(w){f+=",width="+w;}else{if(d.body.clientWidth)f+=",width="+d.body.clientWidth;else f+=",width="+window.innerWidth;}if(h){f+=",height="+h;}else{if(d.body.clientHeight)f+=",height="+d.body.clientHeight;else f+=",height="+window.innerHeight;}if(c){if(w&&window.screen.availWidth)f+=",left="+Math.round((window.screen.availWidth-parseInt(w))/2);if(h&&window.screen.availHeight)f+=",top="+Math.round((window.screen.availHeight-parseInt(h))/2);}nw=window.open(u,n,f);nw.focus();}

var newwin=function(u,w,h){ow(u,w,h,true,true,true);}
var preview=function(u,w,h){ow(u,w,h,false,false,true);}
var mailWindow=function(u,w,h){ow(u,w,h,false,false,true);}
var textWindow=function(u,w,h){ow(u,w,h,false,false,true);}
