
function GoToArticle(article, department, departmentDefault)
{
	if (department != 0)
		document.location.href = '/article.aspx?idp=' + department + '&id=' + article;
	else
		document.location.href = '/article.aspx?idp=' + departmentDefault + '&id=' + article;
}

function RedirectToDepartment(department)
{
	document.location.href = '/default.aspx?idp=' + department;
}

function RedirectToProduct(product)
{
	document.location.href = '/redirectToProduct.aspx?id=' + product;
}

function OpenPopup(strForm,width,height) {
	w = (width) ? width : '800';
	h = (height) ? height : '600';

	var win = window.open(strForm,"","scrollbars=yes,status=yes,menubar=no,fullscreen=no, resizable=0, height="+h+",width="+w);
  	//onerror = null;
	//win.focus();
 	//win.moveTo((top.screen.width-w)/2,(top.screen.height-h)/;2)
}

function Popup(strForm, name, width,height) {
	w = (width) ? width : '900';
	h = (height) ? height : '800';
    PopName = (name) ? name : 'Casiers';
	var win = window.open(strForm, PopName,"scrollbars=yes,status=yes,menubar=no,fullscreen=no, resizable=yes, height="+h+",width="+w);
  	//onerror = null;
 	win.focus();
 	win.moveTo((top.screen.width-w)/2,(top.screen.height-h)/2);
}

function OpenPopupNoel(strForm, w, h) {
	
	var win = window.open(strForm,"","scrollbars=yes,status=yes,menubar=no,fullscreen=no, resizable=0, height="+h+",width="+w);
  	onerror = null;
 	win.focus();
 	win.moveTo((top.screen.width-w)/2,(top.screen.height-h)/2);
}


function OpenFlash(strForm,width,height) {
	w = (width) ? width : '1024';
	h = (height) ? height : '510';

	var win = window.open(strForm,"","scrollbars=yes,status=yes,menubar=no,fullscreen=no, resizable=yes, height="+h+",width="+w);
  	/*
  	onerror = null;
 	win.focus();
 	win.moveTo((top.screen.width-w)/2,(top.screen.height-h)/;2)
 	*/
}

function preloading() {
	if (document.images) {
		this.length=preloading.arguments.length;
		for (var i=0;i<this.length;i++) {
			this[i+1]=new Image();
			this[i+1].src= "/images/Decor/" + preloading.arguments[i];
		}
	}
}

function loadDecor()
{
	var WTPicOver=new preloading("wrapperTop/Onglet2-a.gif","wrapperTop/Onglet3-a.gif","wrapperTop/Onglet4-a.gif","wrapperTop/Onglet5-a.gif","wrapperTop/Onglet6-a.gif","wrapperTop/Onglet7-a.gif","wrapperTop/Onglet8-a.gif","wrapperTop/Onglet9-a.gif","wrapperTop/Onglet10-a.gif","wrapperTop/Onglet11-a.gif");
	var WTPicActive=new preloading("wrapperTop/Onglet2-c.gif","wrapperTop/Onglet3-c.gif","wrapperTop/Onglet4-c.gif","wrapperTop/Onglet5-c.gif","wrapperTop/Onglet6-c.gif","wrapperTop/Onglet7-c.gif","wrapperTop/Onglet8-c.gif","wrapperTop/Onglet9-c.gif","wrapperTop/Onglet10-c.gif","wrapperTop/Onglet11-c.gif");
	var EIPicOver=new preloading("EnterIn/EntrerIn_02-over.gif","EnterIn/EntrerIn_03-over.gif","EnterIn/EntrerIn_04-over.gif","EnterIn/EntrerIn_05-over.gif","EnterIn/EntrerIn_06-over.gif")
}



function OuvrePopup(url,w,h)
{

            param  = 'width='+w+',height='+h+'';

            param += ',titlebar=no';

            param += ',menubar=no';

            param += ',toolbar=no';

            param += ',location=no';

            param += ',status=no';

            param += ',scrollbars=no';

            param += ',resizable=no';

            param += ',fullscreen=no';

            

            winpopup = window.open(url,null,param);

}

function ShowOperations(IsBasket)
{
	if (IsBasket)
		window.open("/operations/offersProducts.aspx?bsk=1", null, 'toolbar=no, location=no, scrollbars=yes');
	else
		window.open("/operations/offersProducts.aspx?bsk=0", null, 'toolbar=no, location=no, scrollbars=yes');
}


