﻿function SetIFrameFocus(frameName, elementId){var domElement=document.frames[frameName].document.getElementById(elementId);if(domElement){domElement.focus();}} function newWindow(mypage,myname,w,h,scroll,pos){var win=null;if(pos=="random"){LeftPosition=(screen.width)?Math.floor(Math.random()*(screen.width-w)):100;TopPosition=(screen.height)?Math.floor(Math.random()*((screen.height-h)-75)):100;}if(pos=="center"){LeftPosition=(screen.width)?(screen.width-w)/2:100;TopPosition=(screen.height)?(screen.height-h)/2:100;}else if((pos!="center" && pos!="random") || pos==null){LeftPosition=50;TopPosition=50}settings='width='+w+',height='+h+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',location=no,directories=no,status=no,menubar=no,toolbar=no,resizable=no';win=window.open(mypage,myname,settings);} function setCookie(c_name,value,expiredays){var exdate=new Date();exdate.setDate(exdate.getDate()+expiredays);document.cookie=c_name+ "=" +escape(value)+((expiredays==null) ? ";path=/" : ";expires="+exdate.toGMTString())+"path=/";} function readCookie(name){var nameEQ=name+"=";var ca=document.cookie.split(';');for(var i=0;i < ca.length;i++){var c=ca[i];while(c.charAt(0)==' ')c=c.substring(1,c.length);if(c.indexOf(nameEQ)==0)return c.substring(nameEQ.length,c.length);}return null} function getCookie(c_name){if(document.cookie.length>0){c_start=document.cookie.indexOf(c_name+"=");if(c_start!=-1){c_start=c_start + c_name.length+1;c_end=document.cookie.indexOf(";",c_start);if (c_end==-1) c_end=document.cookie.length;return unescape(document.cookie.substring(c_start,c_end));}}return ""} function isCookieSet(cookieName){var cookie=readCookie(cookieName);return(cookie!=null&&cookie!="")} function stripHTML(){for(i=0;i<arguments.length;i++)arguments[i].value=arguments[i].value.replace(/<\S[^><]*>/g,"")}
