/*
================================================================
Menor Technical Services JS Utils
================================================================
*/
	function popUp(URL) {
		day = new Date();
		id = day.getTime();
		eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=1,menubar=0,resizable=1,width=750,height=550');");
	}

function randomOrder(inputArray)
{
	return (Math.round(Math.random())-0.5);
}

function preloadImages(inputArray)
{
	var preloadedimages=new Array()
	
	for (p=0;p<inputArray.length;p++){
		preloadedimages[p]=new Image();
		preloadedimages[p].src=inputArray[p];
	}
}

function openGreybox(gbCaption, url, addUniqueTime, w, h){
	if (url != "")
	{
		var wd = 800;
		var ht = 550;
		
		if (w != 0)
			wd = w;
			
		if (h != 0)
			ht = h;
			
		var d = new Date();
		
		if (addUniqueTime)
			url += '&id=' + d.getTime()

		var options = {
		        caption: gbCaption,
		        height: wd,
		        width: ht,
		        fullscreen: false,
		        show_loading: true
		    }
		//var win = new GB_Window(options);
		//var win = new GB_showCenter(options);
		//win.show(url);	
		GB_showCenter(gbCaption, url, ht, wd, null);

	}
}

