/**
 * Copyright (c) 2005 Big Bang Interactive Inc.
 *
 * developer name: Ron Ijack.
 * last modified: Feb 15.2005.
 *
 * This file contains all common javascript functions that are not site specific
*/

/** Pop-up window function (opens pop up windo with the passed width and height and centres on the page */
function NewWindow(mypage,myname,w,h){
	var winl =(screen.width)?(screen.width-w)/2:100;
	var wint =(screen.height)?(screen.height-h)/2:100;
	var settings ='height='+h+',';
	settings +='width='+w+',';
	settings +='height='+h+',';
	settings +='top='+wint+',';
	settings +='left='+winl+',';
	settings +='scrollbars=yes'+',';
	settings +='resizable=no';
	win=window.open(mypage,myname,settings);
	win.focus();
}

function reloadPagePublic(categoryId,page){
	//selectedCategory = eval("document.forms[0].category.value");
	selectedSubCategory = eval("document.forms[0].subCategory.value");
	//alert(selectedSubCategory);
	pageLocation = page+".php?catId="+categoryId+"&secId="+selectedSubCategory;
	document.location = pageLocation;
}

function reloadCurrency(cat){
	selectedCurrency = eval("document.forms[0].currency.value");
	pageLocation = "price_list.php?currency="+selectedCurrency+"&priceCatId="+cat;
	document.location = pageLocation;
	//alert(selectedCurrency);

}