<!--
function PopupPic(sPicURL) { 
     window.open( "/templates/popup.htm?"+sPicURL, "",  
     "resizable=1,HEIGHT=300,WIDTH=700"); 
	return false;
   }


function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
//-->




  jsHover = function() {
    if (!document.getElementById("header")) return;
    var hEls = document.getElementById("header").getElementsByTagName("LI");
    for (var i=0, len=hEls.length; i<len; i++) {
      hEls[i].onmouseover=function() { this.className+=" jshover"; }
      hEls[i].onmouseout=function() { this.className=this.className.replace(" jshover", ""); }
    }
  }
  if (window.attachEvent && navigator.userAgent.indexOf("Opera")==-1) window.attachEvent("onload", jsHover);



// setfooter function
<!--
function getWindowHeight() {
	var windowHeight = 0;
	if (typeof(window.innerHeight) == 'number') {
		windowHeight = window.innerHeight;
	}
	else {
		if (document.documentElement && document.documentElement.clientHeight) {
			windowHeight = document.documentElement.clientHeight;
		}
		else {
			if (document.body && document.body.clientHeight) {
				windowHeight = document.body.clientHeight;
			}
		}
	}
	return windowHeight;
}
function setFooter() {

	if (document.getElementById) {
		var windowHeight = getWindowHeight();
	

		if (windowHeight > 0) {

			var leftcontentHeight = document.getElementById('leftcontainer') ? document.getElementById('leftcontainer').offsetHeight : 0;
			var leftcontentHHeight = document.getElementById('left') ? document.getElementById('left').offsetHeight : 0;
			var rightcontentHeight = document.getElementById('right') ? document.getElementById('right').offsetHeight :0;
			var rightcontentHHeight = document.getElementById('right_contents_top') ? document.getElementById('right_contents_top').offsetHeight :0;
			var rightcontentHHHeight = document.getElementById('right_contents_bottom') ? document.getElementById('right_contents_bottom').offsetHeight :0;
			var begun_=0;
			var lbegun_=0;
			if (document.getElementById('begun_')) begun_=document.getElementById('begun_') ? document.getElementById('begun_').offsetHeight :0;
			if (document.getElementById('sape_')) lbegun_=document.getElementById('sape_') ? document.getElementById('sape_').offsetHeight : 0 ;

			//alert(leftcontentHHeight+'::righttot:'+rightcontentHeight+'::righttop'+rightcontentHHeight+'::lefttotal:'+leftcontentHeight+'::rb:'+rightcontentHHHeight);

			if (leftcontentHHeight<(rightcontentHeight+rightcontentHHeight+rightcontentHHHeight)){
			// ‚›€‚ˆ‚€ˆ… ˆ†…ƒŽ ‹ŽŠ€
			//document.getElementById('menulbb').style.height=(leftcontentHeight-leftcontentHHeight+12+lbegun_+10)+"px";
			}


			if (leftcontentHeight>rightcontentHeight) {
			document.getElementById('right_contents_bottom').style.height=(leftcontentHeight-rightcontentHeight-rightcontentHHeight+begun_+5)+"px";
			} else {contentHeight=rightcontentHeight;}
		}
	}
}


window.onload = function() {
	setFooter();
	onlo();
}
window.onresize = function() {
//	setFooter();
}
//window.onreload=function(){
//link1=true;
//}
//window.onunload=newFeedback();
//-->
function newWin(href){
if (href.href.indexOf("?")!=-1) {newWinS="&newWin"} else {newWinS="?newWin"}
//alert("opening"+href.href+newWinS);
popUp=window.open(href.href+newWinS,'','resizable=yes,scrollbars=1,width=600,height=600');
popUp.focus();
return false;
}



var link=false;

function FnBuilder(el){
if (typeof el.onclick != 'function') {
function New(){link=true;}
}else
{
var Old=el.onclick;
function New(){link=true; return Old();}
}
return New
}

function FnBuilder2(el){
if (typeof el.onsubmit != 'function') {function New(){link=true;}}
 else
 {var Old=el.onsubmit;function New(){link=true; return Old();}} 
return New
}




function onlo(){
//alert('onload ');
//el=document.getElementById['body1'];
//alert(el);


as=document.getElementsByTagName('a');
	for (i=0;i<as.length;i++)
	{
	as[i].onclick=FnBuilder(as[i]);
	}

as=document.getElementsByTagName('form');
	for (i=0;i<as.length;i++)
	{
	as[i].onsubmit=FnBuilder2(as[i]);
	}


if (getCookie('xfconter')==null){
//alert("onlo1 "+document.cookie);
setCookie('xfconter',0,15);
//alert("onlo2 "+document.cookie);
}
a=getCookie('xfconter');
a++;
///alert("onlo3 "+document.cookie);
setCookie('xfconter',a,15);
//alert("onlo4 "+document.cookie);
//alert('onload '+a);
}

function newFeedback(host){

a=getCookie('xfconter');
a--;
if (a<0) a=0;
//alert("onl1 "+document.cookie);
setCookie('xfconter',a,15);
//alert("onl2 "+document.cookie);

//alert("onunload "+a);
//alert(link);
if (getCookie('xfconter')==0&&(link==false)&&(getCookie('xf')!='yes')){
popUp=window.open('http://'+host+'/contents/203/?newWin&member=design','','resizable=yes,scrollbars=1,width=600,height=600');
popUp.focus();
}
//return false;
}


















function setCookie(cookieName,cookieValue,nDays) {
 var today = new Date();
 var expire = new Date();
 if (nDays==null || nDays==0) nDays=1;
 expire.setTime(today.getTime() + 3600000*24*nDays);
 document.cookie = cookieName+"="+escape(cookieValue)
                 + ";expires="+expire.toGMTString()+'; path=/';
}
 
function getCookie(name) {
    var dc = document.cookie;
    var prefix = name + "=";
    var begin = dc.indexOf("; " + prefix);
    if (begin == -1) {
        begin = dc.indexOf(prefix);
        if (begin != 0) return null;
    } else {
        begin += 2;
    }
    var end = document.cookie.indexOf(";", begin);
    if (end == -1) {
        end = dc.length;
    }
    return unescape(dc.substring(begin + prefix.length, end));
}


