// GENERAL AND NOT SO GENERAL STUFF
// ADD... DON'T REMOVE! ... AT THE END, IT'S A CHAOS ANYWAY

function CentreWindow(mypage, myname, w, h, scroll) {
	var winl = ((screen.width - w) / 2) - 305;
	var wint = ((screen.height - h) / 2) - 230;
	winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll+',toolbar=no,resizable=no,status=no'
	win = window.open(mypage, myname, winprops)
	if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
	win.window.focus();
}

function openStoreLocator(){
  CentreWindow('http://www.diesel.co.jp/store/pop.html','stores','720','360','no');
}

// function joinTheCult(){
//  CentreWindow('https://www.diesel.co.jp/jointhecult/join.php','Join','675','560','yes');
// }


function resizeBrowser(width, height){
	window.resizeTo(width, height)
}

// function openFashionShow(){
// 	CentreWindow('http://www.diesel.co.jp/fashionshow/ss06/', 'DIESEL', '1024', '768', 'no');
// }

function openFashionShow(){
	var url='/fashionshow/ss06/site.php';
	var name='fashionshow';
	w=1024;
	h=550;
	extra=0;
	if(extra == "0") { extra = "scrollbars=0"; }
    if(extra == "1") { extra = "scrollbars=1"; }
	str='height='+h+',width='+w+','+extra;
	if(parseInt(navigator.appVersion)>3)
		str+=',left='+((screen.width-8) -w)/2+',top='+parseInt((screen.height -h)/3);
	win=window.open(url,name,str);
}

function openClubCard(){
	var url='/clubcard/clubcard.html';
	var name='clubcard';
	w=720;
	h=400;
	extra=1;
	if(extra == "0") { extra = "scrollbars=0"; }
    if(extra == "1") { extra = "scrollbars=1"; }
	str='height='+h+',width='+w+','+extra;
	if(parseInt(navigator.appVersion)>3)
		str+=',left='+((screen.width-8) -w)/2+',top='+parseInt((screen.height -h)/3);
	win=window.open(url,name,str);
}
