<!--//
//	BEGINNING OF THE SCRIPT
//	++++++++++++++++++++++++++++++++++++++++++++++++++++++++
//	Created by Igor V. at Kuchi - communication design
//	All rights reserved
//	date : 12-03-2003 | mm-dd-year
//	version : 1.3
//	desc.: some auto. popup routine
//	++++++++++++++++++++++++++++++++++++++++++++++++++++++++

// run link in popup screen | general case
function runInPop(lnk,wSize,hSize,scr,wName,cent,res) {
	
	// defining all local variables of the function
	var sW = screen.width;	// for the future calculations of the popup position
	var sH = screen.height;	// -"-
	var W = wSize;			// for the popup win. size in pixels : Integer
	var H = hSize;			// -"- in pixel : Integer
	var scrBar = scr;		// for the scroll bar [yes/no] : String
	var winName = wName;	// for the win. name : String
	var cName = cent;		// for the centered or corner win. pos. : Boolean
	var reSizble = res;		// for resizable [yes/no] : String
	
	// the following line for debugging only
	//alert(sW +"\n"+ sH);
	
	if (cName=="true") { // if centered
		// setting the popup position depending on the screen resolution of the surfer
		if (sW > 800) {	// for the screen res. greater then 800x600
			// setting window in the middle of the screen
			subW = sW / 2 - W / 2;
			subH = sH / 2 - H / 2;
			// the following line for debugging only
			//alert(subW +"\n"+ subH);
			// defining scrolls
		} else {	// for the screen res. smaller then 640x480
			// setting window in the left top corner
			subW = 0;
			subH = 0;
		}
		// setting popup features to scrollbars=OFF and resizable=OFF
		cust_WinFeatures = 'width='+W+', height='+H+', scrollbars='+scrBar+', resizable='+reSizble+', toolbar=no, location=no, menubar=no, status=no, top='+subH+', left='+subW+'';
		// executing window with the properties defined before
		winName = window.open(lnk, winName, cust_WinFeatures);
		// setting window focus
		winName.focus();
	} else { // if execute in the corner
		subW = 0;
		subH = 0;
		// setting popup features to scrollbars=OFF and resizable=OFF
		cust_WinFeatures = 'width='+W+', height='+H+', scrollbars='+scrBar+', resizable='+reSizble+', toolbar=no, location=no, menubar=no, status=no, top='+subH+', left='+subW+'';
		// executing window with the properties defined before
		winName = window.open(lnk, winName, cust_WinFeatures);
		// setting window focus
		winName.focus();
	}
}

//	END OF THE SCRIPT
//-->
