// QuikClip window-opener v1

qliteWidth=640;
qliteHeight=480;
ModalWin = null;
TP = (screen.height) ? (screen.height-368)/2 : 0;
LP = (screen.width) ? (screen.width-362)/2 : 0;
settings = 'top='+TP+',left='+LP+',scrollbars=no'
function openWin(sticky_URL) {
var pattern = /\#/g;
var sticky_URL_fix = sticky_URL.replace(pattern, "%23");
//alert(sticky_URL+'\n'+sticky_URL_fix);

if (!ModalWin || ModalWin.closed) {

	
	if (sticky_URL_fix.indexOf('quikcliplite') != -1) {
		//quikcliplite size settings
		
	//	ModalWin.moveTo((screen.width-qliteWidth)/2, (screen.height-qliteHeight)/2);
	//	ModalWin.resizeTo(qliteWidth, qliteHeight);

		TP = (screen.height) ? (screen.height-qliteHeight)/2 : 0;
		LP = (screen.width) ? (screen.width-qliteWidth)/2 : 0;


		settings+=',height='+qliteHeight+',width='+qliteWidth;	
	}else{
		settings+=',height=480,width=490';		
	} 

	ModalWin = window.open(sticky_URL_fix,"ModalWin",settings)
 
}else{
	ModalWin.focus();
}

}