/*
ProcterGamble

SiB-IDS

utils

V 1.0

created 23-02-2005 js
last edited 25-02-2005 js
*/
/* for multimedia links*/
function open_pic_scroll(path,name,width,height) { 
	
		prefs = "resizable=no,scrollbars=yes,menubar=no,toolbar=no,directories=no,location=no,status=no,width="+width+",height="+height;
		thWin = window.open(path,name,prefs);
		thWin.focus();
}
/*end  for multimedia links*/

function open_popup(path,name,width,height) {
	
		prefs = "resizable=no,scrollbars=no,menubar=no,toolbar=no,directories=no,location=no,status=no,width="+width+",height="+height;
		thWin = window.open(path,name,prefs);
		thWin.focus();
}

function open_popup_scroll(path,name,width,height) {

		prefs = "resizable=no,scrollbars=yes,scrolling=1,menubar=no,toolbar=no,directories=no,location=no,status=no,width="+width+",height="+height;
		thWin = window.open(path,name,prefs);
		thWin.focus();
}

function showproduct_print(printFile) {
	defaultHeight=822;
	deltaHeight=97;
	if (screen.availHeight<(defaultHeight+deltaHeight)) {
		height=screen.availHeight-deltaHeight;
	} else {
		height=defaultHeight;
	}
	printPage=eval("window.open(printFile, \"printwindow\", \"toolbar=yes,resize=yes,status=no,scrollbars=yes,personalbar=no,menubar=yes,width=700,height="+height+"\")");
}

function openPrintPage() {
	printFile=document.location.href;
	printFile=printFile.split("/");
	printFile=printFile[printFile.length-1];
	printFile=printFile.split("?");
	printFile=printFile[0];
	printFile=printFile.split("#");
	printFile=printFile[0];
	printFile=printFile.split(".");
	printFile=printFile[0]+"_print."+printFile[1];
	
	defaultHeight=822;
	deltaHeight=97;
	if (screen.availHeight<(defaultHeight+deltaHeight)) {
		height=screen.availHeight-deltaHeight;
	} else {
		height=defaultHeight;
	}
	printPage=eval("window.open(printFile, \"printwindow\", \"toolbar=yes,resize=yes,status=no,scrollbars=yes,personalbar=no,menubar=yes,width=700,height="+height+"\")");
}


function showAnswer(i,x) {
	if(navigator.vendor) {
	for(a=1; a<=x; a++) {
		document.getElementById(a).style.display='none';
	}
	document.getElementById(i).style.display='table-row';	
	} else {
	for(a=1; a<=x; a++) {
		document.getElementById(a).style.display='none';
	}
	document.getElementById(i).style.display='block';	
	}
}

