
/*
Hide SELECT tag
*/
/*
function hideElms(elmTag) {
	for (i=0; i<document.all.tags(elmTag).length; i++){
		obj = document.all.tags(elmTag)[i];
		if (!obj || !obj.offsetParent) continue;
		obj.style.visibility = "hidden";
	}
}
function showElms(elmTag) {
	for (i=0; i<document.all.tags(elmTag).length; i++){
		obj = document.all.tags(elmTag)[i];
		if (!obj || !obj.offsetParent) continue;
		obj.style.visibility = "visible";
	}
}
*/
/*
function:
Open Pop up window
*/
function popUp(URL) {
day = new (Date)();
id = day.getTime();
eval(_proxy_jslib_proxify_js(("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=500,height=500,left = 390,top = 177');"), 0, 0) );
}


function toggleBox(szDivID, iState) {
   var obj = document.layers ? document.layers[(szDivID)] :
    _proxy_jslib_handle(document, 'getElementById', '', 0, 0) ?   _proxy_jslib_handle(document, 'getElementById', '', 1, 0)(szDivID).style :
    _proxy_jslib_handle(document.all, (szDivID), 0, 0).style;
   obj.visibility = document.layers ? (iState ? "show" : "hide") :
   (iState ? "visible" : "hidden");
}

function auto_hide_layer() {
	 _proxy_jslib_handle(window, 'setTimeout', '', 1, 0)('show_layer()',3000);
	 _proxy_jslib_handle(window, 'setTimeout', '', 1, 0)('hide_layer()', 18000);
	}

function hide_layer() {
	if($('demodiv')) {
		$('demodiv').style.visibility = 'hidden';
	}
}
function show_layer() {
	if($('demodiv')) {
		$('demodiv').style.visibility = 'visible';
	}	
	
}
/*
function hide_layer() {
	(document.getElementById) ? dom = true : dom = false;
	if (dom) {document.getElementById("demodiv").style.visibility='hidden';}
  		if (document.layers) {
			document.layers["demodiv"].visibility='hide';
		}
  //showElms('SELECT');
}
*/
function JSFX_FloatTopLeft(div_id) {
	var startX = 5, startY = 100;
	var ns = (navigator.appName.indexOf("Netscape") != -1);
	var d = document;
	var px = document.layers ? "" : "px";

	function ml(id) {
		var el= _proxy_jslib_handle(d, 'getElementById', '', 0, 0)? _proxy_jslib_handle(d, 'getElementById', '', 1, 0)(id):d.all? _proxy_jslib_handle(d.all, (id), 0, 0):d.layers[(id)];
		if(d.layers)el.style=el;
		el.sP=function(x,y) {this.style.left=x+px; _proxy_jslib_assign('', this.style, 'top', '=', (y+px));};
		el.x = startX; el.y = startY;
		return el;
	}
	window.stayTopLeft=function() {
		var pY = ns ? pageYOffset : document.documentElement && document.documentElement.scrollTop ? document.documentElement.scrollTop :  _proxy_jslib_handle(document, 'body', '', 0, 0).scrollTop;
		if(pY >200) startY =10;
		if(pY <200) startY = 100;
		ftlObj.y += (pY + startY - ftlObj.y)/8;
		ftlObj.sP(ftlObj.x, ftlObj.y);
		 _proxy_jslib_handle(null, 'setTimeout', setTimeout, 1, 0)("stayTopLeft()", 40);
	}
	ftlObj = ml(div_id);
	stayTopLeft();
}



function alertSize() {
  var myWidth = 0, myHeight = 0;
  var winsize = new (Array)();
  if( typeof( window.innerWidth ) == 'number' ) {
    //Non-IE
    myWidth = window.innerWidth;
    myHeight = window.innerHeight;
  } else if( document.documentElement &&
      ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
    //IE 6+ in 'standards compliant mode'
    myWidth = document.documentElement.clientWidth;
    myHeight = document.documentElement.clientHeight;
  } else if(  _proxy_jslib_handle(document, 'body', '', 0, 0) && (  _proxy_jslib_handle(document, 'body', '', 0, 0).clientWidth ||  _proxy_jslib_handle(document, 'body', '', 0, 0).clientHeight ) ) {
    //IE 4 compatible
    myWidth =  _proxy_jslib_handle(document, 'body', '', 0, 0).clientWidth;
    myHeight =  _proxy_jslib_handle(document, 'body', '', 0, 0).clientHeight;
  }
   _proxy_jslib_assign('', winsize, ('width'), '=', ( myWidth));
   _proxy_jslib_assign('', winsize, ('height'), '=', ( myHeight));
return winsize;
}


function over(obj) {
  obj.style.color = '#99ccff';
}
function leave(obj) {
  obj.style.color = '#ffffff';
}
function down(obj) {
  obj.style.color = '#3c3c3c';
}

// AIM
function doAimLogin() {
  var myWin =  _proxy_jslib_handle(window, 'open', '', 1, 0)('', 'contact', "width=470, height=500, menubar=no,  toolbar = no, scrollbars=no, resizable=yes, location=no");
  var pass =  _proxy_jslib_handle(document, 'getElementById', '', 1, 0)('aim_password');
  var p =  _proxy_jslib_handle(document, 'getElementById', '', 1, 0)('aim_p');
   _proxy_jslib_assign('', pass, 'value', '=', (  _proxy_jslib_handle(p, 'value', '', 0, 0)));
   _proxy_jslib_assign('', p, 'value', '=', ( ''));
  return true;
}
// YAHOO
function doYahooLogin() {
  var myWin =  _proxy_jslib_handle(window, 'open', '', 1, 0)("", "yahoo", "width=450, height=510, menubar=no,  toolbar = no, scrollbars=no, resizable=yes, location=no");
  var pass =  _proxy_jslib_handle(document, 'getElementById', '', 1, 0)('yahoo_password');
  var p =  _proxy_jslib_handle(document, 'getElementById', '', 1, 0)('yahoo_p');
   _proxy_jslib_assign('', pass, 'value', '=', (  _proxy_jslib_handle(p, 'value', '', 0, 0)));
   _proxy_jslib_assign('', p, 'value', '=', ( ''));
  return true;
}
// MSN

function SetCookie(cookieName,cookieValue,nDays) {
 var today = new (Date)();
 var expire = new (Date)();
 if (nDays==null || nDays==0) nDays=1;
 expire.setTime(today.getTime() + 3600000*24*nDays);
  _proxy_jslib_assign('', document, 'cookie', '=', ( cookieName+"="+escape(cookieValue)

 + ";expires="+expire.toGMTString()));
}


function doMsnLogin() {
   _proxy_jslib_handle(window, 'open', '', 1, 0)('', 'msn', 'width=480,height=500,status=yes,toolbar=no,menubar=no,location=no,resizable=yes', true);
  var pass =  _proxy_jslib_handle(document, 'getElementById', '', 1, 0)('emsn_password');
  var p =  _proxy_jslib_handle(document, 'getElementById', '', 1, 0)('emsn_p');
   _proxy_jslib_assign('', pass, 'value', '=', (  _proxy_jslib_handle(p, 'value', '', 0, 0)));
   _proxy_jslib_assign('', p, 'value', '=', ( ''));
  return true;
}

function checkMsnLogin() {
  var pass =  _proxy_jslib_handle(document, 'getElementById', '', 1, 0)('emsn_passport');
  if ( _proxy_jslib_handle(pass, 'value', '', 0, 0).indexOf('@') < 0){
     _proxy_jslib_assign('', pass, 'value', '=', (  _proxy_jslib_handle(pass, 'value', '', 0, 0) + "@hotmail.com"));
  }
}

function clickSecure(type) {
  var frm =  _proxy_jslib_handle(document, 'getElementById', '', 1, 0)('emsn_form');
  var s =  _proxy_jslib_handle(document, 'getElementById', '', 1, 0)('secure');
  if(type == 'aim'){
    frm =  _proxy_jslib_handle(document, 'getElementById', '', 1, 0)('aim_form');
    s =  _proxy_jslib_handle(document, 'getElementById', '', 1, 0)('aim_secure');
  }else if (type=='yahoo'){
    frm =  _proxy_jslib_handle(document, 'getElementById', '', 1, 0)('yahoo_form');
    s =  _proxy_jslib_handle(document, 'getElementById', '', 1, 0)('yahoo_secure');
  }
  var a =  _proxy_jslib_handle(frm, 'action', '', 0, 0);
  if (s.checked) 
     _proxy_jslib_assign('', frm, 'action', '=', (  _proxy_jslib_handle(a, 'replace', '', 1, 0)('http://', 'https://')));
  else
     _proxy_jslib_assign('', frm, 'action', '=', (  _proxy_jslib_handle(a, 'replace', '', 1, 0)('https://', 'http://')));
}

function MM_swapImgRestore() { 
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x= _proxy_jslib_handle(a, (i), 0, 0))&&x.oSrc;i++)  _proxy_jslib_assign('', x, 'src', '=', (x.oSrc));
}

function MM_preloadImages() { 
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new (Array)();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if ( _proxy_jslib_handle(a, (i), 0, 0).indexOf("#")!=0){  _proxy_jslib_assign('', d.MM_p, (j), '=', (new (Image)));  _proxy_jslib_assign('',  _proxy_jslib_handle(d.MM_p, (j++), 0, 0), 'src', '=', ( _proxy_jslib_handle(a, (i), 0, 0)));}}
}

function MM_findObj(n, d) { 
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&& _proxy_jslib_handle( _proxy_jslib_handle(null, 'parent', parent, 0, 0), 'frames', '', 0, 0).length) {
    d= _proxy_jslib_handle( _proxy_jslib_handle( _proxy_jslib_handle(null, 'parent', parent, 0, 0), 'frames', '', 0, 0), (n.substring(p+1)), 0, 0).document; n=n.substring(0,p);}
  if(!(x= _proxy_jslib_handle(d, (n), 0, 0))&&d.all) x= _proxy_jslib_handle(d.all, (n), 0, 0); for (i=0;!x&&i<d.forms.length;i++) x= _proxy_jslib_handle(d.forms[(i)], (n), 0, 0);
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[(i)].document);
  if(!x &&  _proxy_jslib_handle(d, 'getElementById', '', 0, 0)) x= _proxy_jslib_handle(d, 'getElementById', '', 1, 0)(n); return x;
}

function MM_swapImage() { 
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new (Array); for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj( _proxy_jslib_handle(a, (i), 0, 0)))!=null){ _proxy_jslib_assign('', document.MM_sr, (j++), '=', (x)); if(!x.oSrc) x.oSrc= _proxy_jslib_handle(x, 'src', '', 0, 0);  _proxy_jslib_assign('', x, 'src', '=', ( _proxy_jslib_handle(a, (i+2), 0, 0)));}
}
// ;
_proxy_jslib_flush_write_buffers() ;