var timer;var ghwcontent;var ghalpha=0;function f_clientWidth() {	return biggest (window.innerWidth ? window.innerWidth : 0,		document.documentElement ? document.documentElement.clientWidth : 0,		document.body ? document.body.clientWidth : 0);}function f_clientHeight() {	return smallest (window.innerHeight ? window.innerHeight : 0,		document.documentElement ? document.documentElement.clientHeight : 0,		document.body ? document.body.clientHeight : 0);}function f_scrollLeft() {	return smallest (window.pageXOffset ? window.pageXOffset : 0,		document.documentElement ? document.documentElement.scrollLeft : 0,		document.body ? document.body.scrollLeft : 0);}function f_scrollTop() {	return smallest (window.pageYOffset ? window.pageYOffset : 0,		document.documentElement ? document.documentElement.scrollTop : 0,		document.body ? document.body.scrollTop : 0);}function biggest(v1, v2, v3) { // return largest number	var v4 = v1 > v2 ? v1 : v2;	var v5 = v4 > v3 ? v4 : v3;	return v5;}function smallest(n_win, n_docel, n_body) { // return smallest number	var n_result = n_win ? n_win : 0;	if (n_docel && (!n_result || (n_result > n_docel)))		n_result = n_docel;	return n_body && (!n_result || (n_result > n_body)) ? n_body : n_result;}function ghwgrow(sector){	ghwid=document.getElementById(sector);	theheight=parseInt(ghwid.offsetHeight);     if (ghalpha < 100) {     	ghwid.style.height = (ghalpha*2.5)+'px';//     	ghwid.style.top = parseInt(midY-(theheight/2))+'px';		setOpacity(ghwid,ghalpha/100);		ghalpha = ghalpha+5;	 	}	 else {     	ghwid.style.height = '250px';		setOpacity(ghwid,1);        clearInterval(timer);      }}function setOpacity(element,level) {  element.style.opacity = level;  element.style.MozOpacity = level;  element.style.KhtmlOpacity = level;}function setOpacityIE7(element,level) {  element.style.opacity = level;  element.style.MozOpacity = level;  element.style.KhtmlOpacity = level;  element.style.filter = "alpha(opacity=" + (level * 100) + ");";}function ghwshrink(sector){	ghwid=document.getElementById(sector);	theheight=parseInt(ghwid.offsetHeight);     if (ghalpha >= 5) {		setOpacity(ghwid,ghalpha/100);		ghalpha = ghalpha-5;	 	}	 else {		ghwid.style.visibility="hidden";        clearInterval(timer);      }}function clearPopups() {	popid=document.getElementById('paycat_popup');	setOpacity(popid,0);	popid.style.visibility="hidden";	popid=document.getElementById('make_popup');	setOpacity(popid,0);	popid.style.visibility="hidden";	popid=document.getElementById('model_popup');	setOpacity(popid,0);	popid.style.visibility="hidden";	popid=document.getElementById('network_popup');	setOpacity(popid,0);	popid.style.visibility="hidden";	popid=document.getElementById('gift_popup');	setOpacity(popid,0);	popid.style.visibility="hidden";	popid=document.getElementById('price_popup');	setOpacity(popid,0);	popid.style.visibility="hidden";}function ghw(id) {	midX=f_scrollLeft()+(f_clientWidth()/2);	midY=f_scrollTop()+(f_clientHeight()/2);	ghwid=document.getElementById(id);	ghwid.style.left=midX-320+'px';	setOpacity(ghwid,0);	ghwid.style.visibility="visible";    timer = setInterval("ghwgrow('"+id+"')", 20);}function ghwclose(id){      timer = setInterval("ghwshrink('"+id+"')",3);}function SelectPaycat() {    clearPopups();    ghw('paycat_popup');}function SelectMake() {    clearPopups();    ghw('make_popup');}function SelectModel() {    clearPopups();    ghw('model_popup');}function SelectNetwork() {    clearPopups();    ghw("network_popup");}function SelectGift() {    clearPopups();    ghw('gift_popup');}function SelectPrice() {    clearPopups();    ghw('price_popup');}function SelectAccMake() {    clearPopups();    ghw('accmake_popup');}function SelectAccModel() {    clearPopups();    ghw('accmodel_popup');}function SelectAccCat() {    clearPopups();    ghw('acccat_popup');}function fonesure() {    ghw('fonesure');}