// JavaScript Document

function openPopUp(_location,_width,_height,_top,_left)
{
	if(isNaN(_top))
	_top = (window.screen.height - (_height + 50))/2;

	if(isNaN(_left))
	_left = (window.screen.width - _width)/2;
	
	var newWin;
	var args='width='+_width+',height='+_height+',left='+_left+',top='+_top+',toolbar=0,';
    args+='location=0,status=0,menubar=0,scrollbars=1,resizable=0'; 
	
	newWin = window.open(_location,"",args);
	return newWin;
}

//use this to reload form security image - securityCodeDiv is div id
var cakeGlobalSecurityImageSeq = Math.floor(Math.random()*50000);
function reloadSecurityCode(style) {
    var obj = document.getElementById('securityCodeDiv');
    var txt = '<img src="/getImage/formCode/180/35/' + cakeGlobalSecurityImageSeq;
        txt+= '/code.gif" title="please type text from this image to field below" alt="" style="'+style+'">';
    obj.innerHTML = txt;
    cakeGlobalSecurityImageSeq++;
}
