/********************
*   Dhtml Modal Window
*********************/
var loginPopObj;
function dhtmlModalWindow(target, title, width, height)
{
   _height=parseInt(height)+25;
   _width=parseInt(width);
	if(navigator.appName=='Microsoft Internet Explorer'){
	popupwin = dhtmlmodal.open('loginpopupbox', 'iframe', target,title, 'center=1, height='+(_height)+'px, resize=0, scrolling=0, width='+(_width)+'px', '');
	}else{ 
	popupwin = dhtmlmodal.open('loginpopupbox', 'iframe', target,title, 'center=1, height='+height+'px, resize=0, scrolling=0, width='+width+'px', '');
	}
   loginPopObj=popupwin;
   /* popupwin.onclose = function()
	{
		window.frames['_iframe-loginpopupbox'].location = '/inc/blank.htm';
		return true;
    }*/
}

function productModalPreview(target, title, width, height)
{
   // _height=parseInt(height)+10;
   _height=10;
	if(navigator.appName=='Microsoft Internet Explorer'){
	    popupwin_pre = dhtmlmodal.open('popupbox', 'iframe', target,title, 'center=1, height='+(_height)+'px, resize=0, scrolling=0, width='+width+'px', '');
        
	}else{
	    popupwin_pre = dhtmlmodal.open('popupbox', 'iframe', target,title, 'center=1, height='+height+'px, resize=0, scrolling=0, width='+width+'px', '');
	}
  
    popupwin_pre.moveTo("middle",10);
    /*popupwin.onclose = function()
	{
		window.frames['_iframe-popupbox'].location = '/inc/blank.htm';
		return true;
    }*/
}

/***********************************
*   Preloading Navigation Images
************************************/

function imagePreload(imgArray){
	if(document.images)
	{
		preload_image_object = new Array();
		var i = 0;
		for(i=0; i<imgArray.length; i++) 
		  preload_image_object[i]= new Image();

		// set image url
		image_url = new Array();
		var j = 0;
		for(j=0; j<imgArray.length; j++) 
		  image_url[j] = imgArray[j];

		var k = 0;
		for(k=0; k<imgArray.length; k++) 
		  preload_image_object[k].src = image_url[k];
	}
}

function preloadImages(){

	var imgArray = new Array(10);

	imgArray[0] = "images/product_library.jpg";

	imgArray[1] = "images/product_library_hover.jpg";

	imgArray[2] = "images/designers_brands.jpg";

	imgArray[3] = "images/designers_brands_hover.jpg";

	imgArray[4] = "images/custom_program.jpg";

	imgArray[5] = "images/custom_program_hover.jpg";

	imgArray[6] = "images/mysamples.jpg";

	imgArray[7] = "images/mysamples_hover.jpg";

	imgArray[8] = "images/about_wg.jpg";

	imgArray[9] = "images/about_wg_hover.jpg";

	imagePreload(imgArray);

}

