// misc javascript functions
<!--

function setCookie(c_name,value,exdays)
{
var exdate=new Date();
exdate.setDate(exdate.getDate() + exdays);
var c_value=escape(value) + ((exdays==null) ? "" : "; expires="+exdate.toUTCString());
document.cookie=c_name + "=" + c_value;
}

function getCookie(c_name)
{
var i,x,y,ARRcookies=document.cookie.split(";");
for (i=0;i<ARRcookies.length;i++)
{
  x=ARRcookies[i].substr(0,ARRcookies[i].indexOf("="));
  y=ARRcookies[i].substr(ARRcookies[i].indexOf("=")+1);
  x=x.replace(/^\s+|\s+$/g,"");
  if (x==c_name)
    {
    return unescape(y);
    }
  }
}

function showWhyBubble(){
		document.getElementById('whyloginbubble').style.left='230px';
}
function hideWhyBubble(){
		document.getElementById('whyloginbubble').style.left='-2300px';
}
function showClipTip(){
	
	var surveycookie = getCookie('cliptip');
	if (surveycookie != 'viewed') {

		document.getElementById('cliptip').style.left='25%';
	}
}
function hideClipTip(){
		document.getElementById('cliptip').style.left='-2000px';
}


function dontShowAgain(){
	
	setCookie('cliptip','viewed','365');
	hideClipTip();
}

function newWindow(mypage,myname,w,h,features) {

  if(screen.width){

  var winl = (screen.width-w)/2;

  var wint = (screen.height-h)/2;

  }else{winl = 0;wint =0;}

  if (winl < 0) winl = 0;

  if (wint < 0) wint = 0;

  var settings = 'height=' + h + ',';

  settings += 'width=' + w + ',';

  settings += 'top=' + wint + ',';

  settings += 'left=' + winl + ',';

  settings += features;

  win = window.open(mypage,myname,settings);

  win.window.focus();

}


//-->
