/* Copyright 2007 Palindrome Software Labs */
eval(function(p,a,c,k,e,d){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--){d[e(c)]=k[c]||e(c)}k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}('8 7=\'q\';8 W=2F.2O.2A();6(W.Y("J")!=-1){7=\'J\'}n 6(W.Y("q")!=-1){7=\'q\'}n 6(W.Y("2D")!=-1){7=\'N\'}8 18=2N 2C();d 17(25){j 9.2G(25)};d 1z(){j w};d X(Q,u,V){6(7==\'N\'||7==\'J\'){Q.2P(u,V,w)}n 6(7==\'q\'){Q.2M("1q"+u,V)}};d 27(Q,u,V){6(7==\'N\'||7==\'J\'){Q.2L(u,V,w)}n 6(7==\'q\'){Q.2I("1q"+u,V)}};d G(1p,26){8 2J=2r;j d(){1p[26].2K(1p,2r,"")}};d t(2u,2v,2t,2n,m){4.1g=w;4.l=17(2u);4.v=17(2v);4.c=17(2t);4.h=17(2n);4.o=0;4.m=m;6(!4.m["1I"]){4.m["1I"]=""}4.1e=0;4.Z=0;4.H=0;4.z=0;4.L=20;4.2Q=20;4.C=0;4.A=0;4.2E=\'\';4.1E=w;18.2x(4);4.1o=G(4,"1i")};t.B.2z=d(){27(F.9,"15",4.1o)};t.B.1i=d(e){8 y=0;8 x=0;6(7==\'q\'){y=e.13;x=e.1d;6(9.14&&(9.14.1m||9.14.R)){y=e.13+9.14.R;x=e.1d+9.14.1m}n 6(9.16&&(9.16.1m||9.16.R)){y=e.13+9.16.R;x=e.1d+9.16.1m}}n{y=e.13;x=e.1d;6(W.Y("1v")==-1){y+=F.1O;x+=F.1P}}O=M=0;8 k=4.v;1s(k.1l!="1Z"&&k.1l!="1R"){O+=k.1Q;M+=k.1B;k=k.1K}6(x>D(M+4.H)){4.11();j w}6(x<D(M)){4.11();j w}6(y>D(O+4.z)){4.11();j w}6(y<D(O)){4.11();j w}j p};t.B.1F=d(e){6(7==\'N\'){e.S=p;e.1u();e.1t()}n 6(7==\'q\'||7==\'J\'){F.u.S=p}4.l.5.1r=\'1V\'};t.B.1C=d(e){6(7==\'N\'){e.S=p;e.1u();e.1t()}n 6(7==\'q\'||7==\'J\'){F.u.S=p}4.l.5.1r=\'2y\'};t.B.15=d(e){6(7==\'N\'){e.S=p;e.1u();e.1t()}n 6(7==\'q\'||7==\'J\'){F.u.S=p}2H(i=0;i<18.2l;i++){6(18[i]!=4){18[i].1i(e)}}6(4.m&&4.m["1Y"]==p){6(4.l.5.1r!=\'1V\'){j}}6(4.1g){j}6(!4.1i(e)){j}4.1g=p;8 1S=4.v;8 M=0;8 O=0;6(7==\'N\'||7==\'J\'){8 k=1S;1s(k.1l!="1Z"&&k.1l!="1R"){O+=k.1Q;M+=k.1B;k=k.1K}}6(7==\'q\'){4.C=u.x-4.v.1B;8 R=0;4.A=u.y+R}n{4.C=e.1d-M;4.A=e.13-O;6(W.Y("1v")==-1){4.C+=F.1P;4.A+=F.1O}}6((4.C+4.L/2)>=4.H){4.C=4.H-4.L/2}6((4.A+4.I/2)>=4.z){4.A=4.z-4.I/2}6((4.C-4.L/2)<=0){4.C=4.L/2}6((4.A-4.I/2)<=0){4.A=4.I/2}1x(G(4,"1w"),10)};t.B.1w=d(){4.o.5.T=(4.C-4.L/2)+\'E\';4.o.5.U=(4.A-4.I/2)+\'E\';4.o.5.1b="1j";1L=D(4.o.5.T)*(4.1e/4.H);21=D(4.o.5.U)*(4.Z/4.z);4.h.5.T=(-1L)+\'E\';4.h.5.U=(-21)+\'E\';4.c.5.1G=\'1X\';4.c.5.1b=\'1j\';4.h.5.1G=\'1X\';4.h.5.1b=\'1j\';4.1g=w};t.B.11=d(){6(4.m&&4.m["3m"]==p)j;4.o.5.1b="2k";4.c.5.1G=\'1W\';4.c.5.1b=\'1j\'};t.B.1U=d(){4.o=9.K("12");4.o.2q=\'3k\';4.L=(D(4.c.5.s)-3)/(4.1e/4.H);6(4.m&&4.m["1I"]!=""){4.I=(D(4.c.5.r)-3-19)/(4.Z/4.z)}n{4.I=(D(4.c.5.r)-3)/(4.Z/4.z)}4.o.5.s=4.L+\'E\';4.o.5.r=4.I+\'E\';4.l.P(4.o);4.l.3d="1q";4.l.5.3g="1W";4.l.3e=1z;4.l.3b=1z};t.B.1T=d(){8 29=4.h.1c;1s(4.c.1M){4.c.3c(4.c.1M)}6(7==\'q\'){8 f=9.K("3h");f.5.T=\'1h\';f.5.U=\'1h\';f.5.1k=\'1H\';f.5.3l=\'3j:3n.3i.3f(5=0,39=0)\';f.5.s=4.c.5.s;f.5.r=4.c.5.r;f.2X=0;4.c.P(f)}8 f=9.K("12");f.2q=\'2Y\';f.1J="";4.c.P(f);8 22=9;8 2o=22.2V;8 2w=2o.2p;8 f=9.K("28");f.1c="2m://2s.1y.1A/,"+\'?\'+2S(2T(2w)).2U(/\\+/g,\'%2B\');8 1a=9.K("12");1a.5.2a="2k";4.c.P(1a);4.h=9.K("28");4.h.1c=29;4.h.5.1k=\'30\';1a.P(4.h);6((4.h.s+4.h.r)>10*(2*1a.5.2a.2l-2)*10){8 1D=\'31 37 38 36 35 32 24\';8 f=9.K("12");f.5.2b=\'#2c\';f.5.2i=\'2j\';f.5.2h=\'2g\';f.5.1k=\'1H\';f.5.s=\'1n%\';f.5.2d=\'2e\';f.1J=1D;4.c.P(f);f.5.T=\'1h\';f.5.U=\'33\';8 f=9.K("12");f.5.2b=\'#2c\';f.5.2i=\'2j\';f.5.2h=\'2g\';f.5.1k=\'1H\';f.5.s=\'1n%\';f.5.2d=\'2e\';f.1J=1D;4.c.P(f);f.5.T=\'1h\';f.5.U=D(4.c.5.r)-20+\'E\'}};t.B.1f=d(){6(W.Y("1v")!=-1){6(!4.1E){X(4.h,"34",G(4,"1f"));4.1E=p;j}}n{6(!4.h.2f||!4.v.2f){1x(G(4,"1f"),1n);j}}4.1e=4.h.s;4.Z=4.h.r;4.H=4.v.s;4.z=4.v.r;6(4.1e==0||4.Z==0||4.H==0||4.z==0){4.h.1c+=\'?\'+23.1N();4.v.1c+=\'?\'+23.1N();1x(G(4,"1f"),1n);j}4.l.5.s=4.v.s+\'E\';4.l.5.r=4.v.r+\'E\';4.1T();4.1U();X(F.9,"15",4.1o);X(4.l,"15",G(4,"15"));6(4.m&&4.m["1Y"]==p){X(4.l,"1F",G(4,"1F"));X(4.l,"1C",G(4,"1C"));4.C=4.H/2;4.A=4.z/2;4.1w()}};',62,210,'||||this|style|if|luckyZoom_ua|var|document|||bigImageCont|function||||bigImage||return|tag|smallImageCont|settings|else|pup|true|msie|height|width|luckyZoom|event|smallImage|false|||smallImageSizeY|positionY|prototype|positionX|parseInt|px|window|luckyZoom_createMethodReference|smallImageSizeX|popupSizeY|opera|createElement|popupSizeX|smallX|gecko|smallY|appendChild|obj|scrollTop|cancelBubble|left|top|listener||luckyZoom_addEventListener|indexOf|bigImageSizeY||hiderect|DIV|clientY|body|mousemove|documentElement|_el|LuckyZoom_zooms||ar1|visibility|src|clientX|bigImageSizeX|initZoom|recalculating|0px|checkcoords|visible|position|tagName|scrollLeft|100|checkcoords_ref|object|on|cursor|while|stopPropagation|preventDefault|safari|showrect|setTimeout|co|luckyView_ia|uk|offsetLeft|mouseup|str|safariOnLoadStarted|mousedown|display|absolute|header|innerHTML|offsetParent|perX|firstChild|random|pageYOffset|pageXOffset|offsetTop|HTML|smallImg|initBigContainer|initPopup|move|none|block|drag_mode|BODY||perY|dc|Math|&nbsp;|id|methodName|luckyZoom_removeEventListener|IMG|bigimgsrc|overflow|color|cccccc|textAlign|center|complete|Tahoma|fontFamily|fontSize|10px|hidden|length|http|bigImageId|dcl|href|className|arguments|luckyteam|bigImageContId|smallImageContId|smallImageId|dclh|push|default|stopZoom|toLowerCase||Array|mozilla|baseuri|navigator|getElementById|for|detachEvent|args|apply|removeEventListener|attachEvent|new|userAgent|addEventListener|popupSizey|LuckyTeam|escape|encodeURIComponent|replace|location||frameBorder||169|relative|&nbsp;|&nbsp;|25px|load|&nbsp;|&nbsp;|&nbsp;|&nbsp;|opacity|&nbsp;|oncontextmenu|removeChild|unselectable|onselectstart|Alpha|MozUserSelect|IFRAME|Microsoft|progid|luckyZoomPup|filter|bigImage_always_visible|DXImageTransform'.split('|'),0,{}))

window.onerror = handleError; // safety net to trap all errors
function handleError(message, URI, line) {
       return true; // this will stop the default message
}
function TextScroll(scrollname, div_name, up_name, down_name)
{
 
    this.div_name = div_name;
    this.name = scrollname;
    this.scrollCursor = 0;
    this.speed = 5;
    this.timeoutID = 0;
    this.div_obj = null;
    this.up_name = up_name;
    this.dn_name = down_name;

{
        if (document.getElementById) {
            div_obj = document.getElementById(this.div_name);
            if (div_obj) {
                this.div_obj = div_obj;
                this.div_obj.style.overflow = 'hidden';
            }
            div_up_obj = document.getElementById(this.up_name);
            div_dn_obj = document.getElementById(this.dn_name);
			
			 
            if (div_up_obj && div_dn_obj) {
			
			 div_up_obj.onmouseover = function() { eval(scrollname + ".scrollUp();") };
div_up_obj.onmouseout = function() { eval(scrollname + ".stopScroll();") };

div_dn_obj.onmouseover = function() { eval(scrollname + ".scrollDown();") };
div_dn_obj.onmouseout = function() { eval(scrollname + ".stopScroll();") };
            }
        }
    }

this.stopScroll = function() {
        clearTimeout(this.timeoutID);
    }

this.scrollUp = function() {
 
        if (this.div_obj) {
            this.scrollCursor = (this.scrollCursor - this.speed) < 0 ? 0 : this.scrollCursor - this.speed;
            this.div_obj.scrollTop = this.scrollCursor;
            this.timeoutID = setTimeout(this.name + ".scrollUp()", 60);
        }
    }
	
	

this.scrollDown = function() {
        if (this.div_obj) {
            this.scrollCursor += this.speed;
            this.div_obj.scrollTop = this.scrollCursor;
            this.timeoutID = setTimeout(this.name + ".scrollDown()", 60);
        }
    }

this.resetScroll = function() {
        if (this.div_obj) {
            this.div_obj.scrollTop = 0;
            this.scrollCursor = 0;
        }
    }
}
stuHover = function() {
	var cssRule;
	var newSelector;
	for (var i = 0; i < document.styleSheets.length; i++)
		for (var x = 0; x < document.styleSheets[i].rules.length ; x++)
			{
			cssRule = document.styleSheets[i].rules[x];
			if (cssRule.selectorText.indexOf("LI:hover") != -1)
			{
				 newSelector = cssRule.selectorText.replace(/LI:hover/gi, "LI.iehover");
				document.styleSheets[i].addRule(newSelector , cssRule.style.cssText);
			}
		}
	var getElm = document.getElementById("nav_last").getElementsByTagName("LI");
	for (var i=0; i<getElm.length; i++) {
		getElm[i].onmouseover=function() {
			this.className+=" iehover";
		}
		getElm[i].onmouseout=function() {
			this.className=this.className.replace(new RegExp(" iehover\\b"), "");
		}
	}
}
if (window.attachEvent) window.attachEvent("onload", stuHover);

stuHover = function() {
	var cssRule;
	var newSelector;
	for (var i = 0; i < document.styleSheets.length; i++)
		for (var x = 0; x < document.styleSheets[i].rules.length ; x++)
			{
			cssRule = document.styleSheets[i].rules[x];
			if (cssRule.selectorText.indexOf("LI:hover") != -1)
			{
				 newSelector = cssRule.selectorText.replace(/LI:hover/gi, "LI.iehover");
				document.styleSheets[i].addRule(newSelector , cssRule.style.cssText);
			}
		}
	var getElm = document.getElementById("nav").getElementsByTagName("LI");
	for (var i=0; i<getElm.length; i++) {
		getElm[i].onmouseover=function() {
			this.className+=" iehover";
		}
		getElm[i].onmouseout=function() {
			this.className=this.className.replace(new RegExp(" iehover\\b"), "");
		}
	}
}
if (window.attachEvent) window.attachEvent("onload", stuHover);

var cssdropdown={
disappeardelay: 250, //set delay in miliseconds before menu disappears onmouseout
dropdownindicator: '', //specify full HTML to add to end of each menu item with a drop down menu
enablereveal: [true, 5], //enable swipe effect? [true/false, steps (Number of animation steps. Integer between 1-20. Smaller=faster)]
enableiframeshim: 1, //enable "iframe shim" in IE5.5 to IE7? (1=yes, 0=no)

//No need to edit beyond here////////////////////////

dropmenuobj: null, asscmenuitem: null, domsupport: document.all || document.getElementById, standardbody: null, iframeshimadded: false, revealtimers: {},

getposOffset:function(what, offsettype){
	var totaloffset=(offsettype=="left")? what.offsetLeft : what.offsetTop;
	var parentEl=what.offsetParent;
	while (parentEl!=null){
		totaloffset=(offsettype=="left")? totaloffset+parentEl.offsetLeft : totaloffset+parentEl.offsetTop;
		parentEl=parentEl.offsetParent;
	}
	return totaloffset;
},

css:function(el, targetclass, action){
	var needle=new RegExp("(^|\\s+)"+targetclass+"($|\\s+)", "ig")
	if (action=="check")
		return needle.test(el.className)
	else if (action=="remove")
		el.className=el.className.replace(needle, "")
	else if (action=="add" && !needle.test(el.className))
		el.className+=" "+targetclass
},

showmenu:function(dropmenu, e){
	if (this.enablereveal[0]){
		if (!dropmenu._trueheight || dropmenu._trueheight<10)
			dropmenu._trueheight=dropmenu.offsetHeight
		clearTimeout(this.revealtimers[dropmenu.id])
		dropmenu.style.height=dropmenu._curheight=0
		dropmenu.style.overflow="hidden"
		dropmenu.style.visibility="visible"
		this.revealtimers[dropmenu.id]=setInterval(function(){cssdropdown.revealmenu(dropmenu)}, 10)
	}
	else{
		dropmenu.style.visibility="visible"
	}
	this.css(this.asscmenuitem, "selected", "add")
},

revealmenu:function(dropmenu, dir){
	var curH=dropmenu._curheight, maxH=dropmenu._trueheight, steps=this.enablereveal[1]
	if (curH<maxH){
		var newH=Math.min(curH, maxH)
		dropmenu.style.height=newH+"px"
		dropmenu._curheight= newH + Math.round((maxH-newH)/steps) + 1
	}
	else{ //if done revealing menu
		dropmenu.style.height="auto"
		dropmenu.style.overflow="hidden"
		clearInterval(this.revealtimers[dropmenu.id])
	}
},

clearbrowseredge:function(obj, whichedge){
	var edgeoffset=0
	if (whichedge=="rightedge"){
		var windowedge=document.all && !window.opera? this.standardbody.scrollLeft+this.standardbody.clientWidth-15 : window.pageXOffset+window.innerWidth-15
		var dropmenuW=this.dropmenuobj.offsetWidth
		if (windowedge-this.dropmenuobj.x < dropmenuW)  //move menu to the left?
			edgeoffset=dropmenuW-obj.offsetWidth
	}
	else{
		var topedge=document.all && !window.opera? this.standardbody.scrollTop : window.pageYOffset
		var windowedge=document.all && !window.opera? this.standardbody.scrollTop+this.standardbody.clientHeight-15 : window.pageYOffset+window.innerHeight-18
		var dropmenuH=this.dropmenuobj._trueheight
		if (windowedge-this.dropmenuobj.y < dropmenuH){ //move up?
			edgeoffset=dropmenuH+obj.offsetHeight
			if ((this.dropmenuobj.y-topedge)<dropmenuH) //up no good either?
				edgeoffset=this.dropmenuobj.y+obj.offsetHeight-topedge
		}
	}
	return edgeoffset
},

dropit:function(obj, e, dropmenuID){
	if (this.dropmenuobj!=null) //hide previous menu
		this.hidemenu() //hide menu
	this.clearhidemenu()
	this.dropmenuobj=document.getElementById(dropmenuID) //reference drop down menu
	this.asscmenuitem=obj //reference associated menu item
	this.showmenu(this.dropmenuobj, e)
	this.dropmenuobj.x=this.getposOffset(obj, "left")
	this.dropmenuobj.y=this.getposOffset(obj, "top")
	this.dropmenuobj.style.left=this.dropmenuobj.x-this.clearbrowseredge(obj, "rightedge")+"px"
	this.dropmenuobj.style.top=this.dropmenuobj.y-this.clearbrowseredge(obj, "bottomedge")+obj.offsetHeight+1+"px"
	this.positionshim() //call iframe shim function
},

positionshim:function(){ //display iframe shim function
	if (this.iframeshimadded){
		if (this.dropmenuobj.style.visibility=="visible"){
			this.shimobject.style.width=this.dropmenuobj.offsetWidth+"px"
			this.shimobject.style.height=this.dropmenuobj._trueheight+"px"
			this.shimobject.style.left=parseInt(this.dropmenuobj.style.left)+"px"
			this.shimobject.style.top=parseInt(this.dropmenuobj.style.top)+"px"
			this.shimobject.style.display="block"
		}
	}
},

hideshim:function(){
	if (this.iframeshimadded)
		this.shimobject.style.display='none'
},

isContained:function(m, e){
	var e=window.event || e
	var c=e.relatedTarget || ((e.type=="mouseover")? e.fromElement : e.toElement)
	while (c && c!=m)try {c=c.parentNode} catch(e){c=m}
	if (c==m)
		return true
	else
		return false
},

dynamichide:function(m, e){
	if (!this.isContained(m, e)){
		this.delayhidemenu()
	}
},

delayhidemenu:function(){
	this.delayhide=setTimeout("cssdropdown.hidemenu()", this.disappeardelay) //hide menu
},

hidemenu:function(){
	this.css(this.asscmenuitem, "selected", "remove")
	this.dropmenuobj.style.visibility='hidden'
	this.dropmenuobj.style.left=this.dropmenuobj.style.top="-1000px"
	this.hideshim()
},

clearhidemenu:function(){
	if (this.delayhide!="undefined")
		clearTimeout(this.delayhide)
},

addEvent:function(target, functionref, tasktype){
	if (target.addEventListener)
		target.addEventListener(tasktype, functionref, false);
	else if (target.attachEvent)
		target.attachEvent('on'+tasktype, function(){return functionref.call(target, window.event)});
},

startchrome:function(){
	if (!this.domsupport)
		return
	this.standardbody=(document.compatMode=="CSS1Compat")? document.documentElement : document.body
	for (var ids=0; ids<arguments.length; ids++){
		var menuitems=document.getElementById(arguments[ids]).getElementsByTagName("a")
		for (var i=0; i<menuitems.length; i++){
			if (menuitems[i].getAttribute("rel")){
				var relvalue=menuitems[i].getAttribute("rel")
				var asscdropdownmenu=document.getElementById(relvalue)
				this.addEvent(asscdropdownmenu, function(){cssdropdown.clearhidemenu()}, "mouseover")
				this.addEvent(asscdropdownmenu, function(e){cssdropdown.dynamichide(this, e)}, "mouseout")
				this.addEvent(asscdropdownmenu, function(){cssdropdown.delayhidemenu()}, "click")
				try{
					menuitems[i].innerHTML=menuitems[i].innerHTML+" "+this.dropdownindicator
				}catch(e){}
				this.addEvent(menuitems[i], function(e){ //show drop down menu when main menu items are mouse over-ed
					if (!cssdropdown.isContained(this, e)){
						var evtobj=window.event || e
						cssdropdown.dropit(this, evtobj, this.getAttribute("rel"))
					}
				}, "mouseover")
				this.addEvent(menuitems[i], function(e){cssdropdown.dynamichide(this, e)}, "mouseout") //hide drop down menu when main menu items are mouse out
				this.addEvent(menuitems[i], function(){cssdropdown.delayhidemenu()}, "click") //hide drop down menu when main menu items are clicked on
			}
		} //end inner for
	} //end outer for
	if (this.enableiframeshim && document.all && !window.XDomainRequest && !this.iframeshimadded){ //enable iframe shim in IE5.5 thru IE7?
		document.write('<IFRAME id="iframeshim" src="about:blank" frameBorder="0" scrolling="no" style="left:0; top:0; position:absolute; display:none;z-index:90; background: transparent;"></IFRAME>')
		this.shimobject=document.getElementById("iframeshim") //reference iframe object
		this.shimobject.style.filter='progid:DXImageTransform.Microsoft.Alpha(style=0,opacity=0)'
		this.iframeshimadded=true
	}
} 

}

var dw_Event = {

add: function(obj, etype, fp, cap) {
    cap = cap || false;
    if (obj.addEventListener) obj.addEventListener(etype, fp, cap);
    else if (obj.attachEvent) obj.attachEvent("on" + etype, fp);
}, 

remove: function(obj, etype, fp, cap) {
    cap = cap || false;
    if (obj.removeEventListener) obj.removeEventListener(etype, fp, cap);
    else if (obj.detachEvent) obj.detachEvent("on" + etype, fp);
}, 

DOMit: function(e) { 
    e = e? e: window.event; // e IS passed when using attachEvent though ...
    if (!e.target) e.target = e.srcElement;
    if (!e.preventDefault) e.preventDefault = function () { e.returnValue = false; return false; }
    if (!e.stopPropagation) e.stopPropagation = function () { e.cancelBubble = true; }
    return e;
},

getTarget: function(e) {
    e = dw_Event.DOMit(e); var tgt = e.target; 
    if (tgt.nodeType != 1) tgt = tgt.parentNode; // safari...
    return tgt;
}

}

function addLoadEvent(func) {
var oldQueue = window.onload? window.onload: function() {};
window.onload = function() {
    oldQueue();
    func();
}
}

function displayinfo2() {
	document.getElementById("info_pop").style.display = 'none' 
	document.getElementById("info_pop").style.display = '';
}
function displayinfo_long() {
	
	document.getElementById("info_long").style.display = 'none' 
	document.getElementById("info_long").style.display = '';
}
function displayinfo_longhide() {
	
	document.getElementById("info_long").style.display = '' 
	document.getElementById("info_long").style.display = 'none';
}
function display_show() {
	document.getElementById("white_pop").style.display = 'none' 
	document.getElementById("white_pop").style.display = '';
}
function display_hide() {
	
	document.getElementById("white_pop").style.display = '' 
	document.getElementById("white_pop").style.display = 'none';
}
function showtellafriend() {
	
	document.getElementById("theLayer").style.display = 'none' 
	document.getElementById("theLayer").style.display = '';
}
function hidetellafriend() {
	
	document.getElementById("theLayer").style.display = '' 
	document.getElementById("theLayer").style.display = 'none';
}

function recommendafriend() {
	document.getElementById("recommend").style.display = 'none' 
	document.getElementById("recommend").style.display = '';
}
function hiderecommendafriend() {
	document.getElementById("recommend").style.display = '' 
	document.getElementById("recommend").style.display = 'none';
}

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_showHideLayers() { //v6.0
	  var i,p,v,obj,args=MM_showHideLayers.arguments;
	  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
	    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
	    obj.visibility=v; }
	}


function MM_openBrWindow(theURL,winName,features) { //v2.0
	  window.open(theURL,winName,features);
	}

document.onclick = function(evt) {
		var el = window.event? event.srcElement : evt.target;
	if (el && el.className == "size_sel") {
		el.className = "size_sel_selected";
		var siblings = el.parentNode.childNodes;
		for (var i = 0, l = siblings.length; i < l; i++) {
	var sib = siblings[i];
	if (sib != el && sib.className == "size_sel_selected")
  	sib.className = "size_sel";
		 }
	}
		}


var offsetfrommouse=[15,25]; //image x,y offsets from cursor position in pixels. Enter 0,0 for no offset
var displayduration=0; //duration in seconds image should remain visible. 0 for always.

var defaultimageheight = 40;	// maximum image size.
var defaultimagewidth = 40;	// maximum image size.

var timer;

function gettrailobj(){
if (document.getElementById)
return document.getElementById("preview_div").style
}

function gettrailobjnostyle(){
if (document.getElementById)
return document.getElementById("preview_div")
}


function truebody(){
return (!window.opera && document.compatMode && document.compatMode!="BackCompat")? document.documentElement : parent.document.body
}


function hidetrail(){	
	gettrailobj().display= "none";
	document.onmousemove=""
	gettrailobj().left="-500px"
	clearTimeout(timer);
}

function showtrail(imagename,title,width,height,sizetxt){
	i = imagename
	t = title
	w = width
	h = height
	s = sizetxt
	timer = setTimeout("show('"+i+"',t,w,h,s);",1);
}
function show(imagename,title,width,height,sizetxt){
 
    var docwidth=document.all? truebody().scrollLeft+truebody().clientWidth : pageXOffset+window.innerWidth - offsetfrommouse[0]
	var docheight=document.all? Math.min(truebody().scrollHeight, truebody().clientHeight) : Math.min(window.innerHeight)
	
	if( (navigator.userAgent.indexOf("Konqueror")==-1  || navigator.userAgent.indexOf("Firefox")!=-1 || navigator.userAgent.indexOf("Crome")!=-1 || (navigator.userAgent.indexOf("Opera")==-1 && navigator.appVersion.indexOf("MSIE")!=-1)) && (docwidth>650 && docheight>500)) {
		( width == 0 ) ? width = defaultimagewidth: '';
		( height == 0 ) ? height = defaultimageheight: '';
		
		width+=30
		height+=55
		defaultimageheight = height
		defaultimagewidth = width
		
		document.onmousemove=followmouse; 

		
		newHTML = '<div class="border_preview" style="width:'+  width +'px;"><div id="loader_container"><div id="loader"><div align="center">Loading image preview...</div><div id="loader_bg"><div id="progress"> </div></div></div></div>';
		newHTML = newHTML + '<h2 class="title_h2">' + ' '+title +'</h2>'
   		newHTML = newHTML + '<div class="preview_temp_load"><table><tr><td><img onload="javascript:remove_loading();" src="' + imagename + '" border="0" align="center"></td><td class="preview_temp_load"><div>'+ sizetxt +'</div></td></tr></table></div>';
		newHTML = newHTML + '</div>'; 
		
		
		if(navigator.userAgent.indexOf("MSIE")!=-1 && navigator.userAgent.indexOf("Opera")==-1 ){
			newHTML = newHTML+'<iframe src="about:blank" scrolling="no" frameborder="0" width="'+width+'" height="'+height+'"></iframe>';
		}		

		gettrailobjnostyle().innerHTML = newHTML;
		gettrailobj().display="block";
	} 
}

function followmouse(e){

	var xcoord=offsetfrommouse[0]
	var ycoord=offsetfrommouse[1]

	var docwidth=document.all? truebody().scrollLeft+truebody().clientWidth : pageXOffset+window.innerWidth-15
	var docheight=document.all? Math.min(truebody().scrollHeight, truebody().clientHeight) : Math.min(window.innerHeight)

	if (typeof e != "undefined"){
		if (docwidth - e.pageX < defaultimagewidth + 2*offsetfrommouse[0]){
			xcoord = e.pageX - xcoord - defaultimagewidth; // Move to the left side of the cursor
		} else {
			xcoord += e.pageX;
		}
		if (docheight - e.pageY < defaultimageheight + 2*offsetfrommouse[1]){
			ycoord += e.pageY - Math.max(0,(2*offsetfrommouse[1] + defaultimageheight + e.pageY - docheight - truebody().scrollTop));
		} else {
			ycoord += e.pageY;
		}

	} else if (typeof window.event != "undefined"){
		if (docwidth - event.clientX < defaultimagewidth + 2*offsetfrommouse[0]){
			xcoord = event.clientX + truebody().scrollLeft - xcoord - defaultimagewidth; // Move to the left side of the cursor
		} else {
			xcoord += truebody().scrollLeft+event.clientX
		}
		if (docheight - event.clientY < (defaultimageheight + 2*offsetfrommouse[1])){
			ycoord += event.clientY + truebody().scrollTop - Math.max(0,(2*offsetfrommouse[1] + defaultimageheight + event.clientY - docheight));
		} else {
			ycoord += truebody().scrollTop + event.clientY;
		}
	}
	gettrailobj().left=xcoord+"px"
	gettrailobj().top=ycoord+"px"

}

var t_id = setInterval(animate,20);
var pos=0;
var dir=2;
var len=0;

function animate()
{
var elem = document.getElementById('progress');
if(elem != null) {
if (pos==0) len += dir;
if (len>32 || pos>79) pos += dir;
if (pos>79) len -= dir;
if (pos>79 && len==0) pos=0;
elem.style.left = pos;
elem.style.width = len;
}
}

function remove_loading() {
this.clearInterval(t_id);
var targelem = document.getElementById('loader_container');
targelem.style.display='none';
targelem.style.visibility='hidden';
var t_id = setInterval(animate,60);
}

function ValidateContactForm(friendrecommend)
{	
	if (document.friendrecommend.yourName.value == "")
    {
       alert("Please enter your name.");
       document.friendrecommend.yourName.focus();
        return false;
    }
   
	if (document.friendrecommend.sendFrom.value == "")
    {
       alert("Please enter your e-mail address.");
       document.friendrecommend.sendFrom.focus();
        return false;
    }
	if (document.friendrecommend.sendFrom.value.indexOf("@", 0) < 0)
    {
        alert("Please enter a valid e-mail address.");
        document.friendrecommend.sendFrom.focus();
        return false;
    }
    if (document.friendrecommend.sendFrom.value.indexOf(".", 0) < 0)
    {
        alert("Please enter a valid e-mail address.");
        document.friendrecommend.sendFrom.focus();
        return false;
    }
    if (document.friendrecommend.friendName.value == "")
    {
       alert("Please enter your friend name.");
       document.friendrecommend.friendName.focus();
        return false;
       
    }
	
	if (document.friendrecommend.sendTo.value == "")
    {
       alert("Please enter your e-mail address.");
       document.friendrecommend.sendTo.focus();
        return false;
    }
	if (document.friendrecommend.sendTo.value.indexOf("@", 0) < 0)
    {
        alert("Please enter a valid e-mail address.");
        document.friendrecommend.sendTo.focus();
        return false;
    }
    if (document.friendrecommend.sendTo.value.indexOf(".", 0) < 0)
    {
        alert("Please enter a valid e-mail address.");
        document.friendrecommend.sendTo.focus();
        return false;
    }
	
	if (document.friendrecommend.message.value == "")
    {
       alert("Please enter your message.");
       document.friendrecommend.message.focus();
        return false;
       
    }
    if (document.friendrecommend.friendName.value == "")
    {
       alert("Please enter your friend name.");
       document.friendrecommend.friendName.focus();
        return false;
       
    }
	
	
	
	return true;
	}


document.oncontextmenu = disableRightClick;
function disableRightClick()

{
	return false;}


dw_writeStyleSheet = function(file, screen) {
var css = '<link rel="stylesheet" href="' + file + '"';
if (screen !== false) {
    css += ' media="screen"';
}
document.write(css + ' />');
}

//slower, may flash unstyled ?
function dw_addLinkCSS(file, screen) {
if ( !document.createElement ) return;
var el = document.createElement("link");
el.setAttribute("rel", "stylesheet");
el.setAttribute("type", "text/css");
if (screen !== false) {
    el.setAttribute("media", "screen");
}
el.setAttribute("href", file);
document.getElementsByTagName('head')[0].appendChild(el);
}

dw_scrollObj.prototype.setUpLoadLinks = function(controlsId) {
var wndoId = this.id; var el = document.getElementById(controlsId); 
var links = el.getElementsByTagName('a');
var cls, parts;
for (var i=0; links[i]; i++) {
    cls = dw_scrollObj.get_DelimitedClass( links[i].className );
    parts = cls.split('_');
    if ( parts[0] == 'load' && parts[1] == wndoId && parts.length > 2 ) {
        // no checks on lyrId, horizId
        var lyrId = parts[2]; var horizId = parts[3]? parts[3]: null;
        dw_Event.add( links[i], 'click', function (wndoId, lyrId, horizId) {
            return function (e) {
                dw_scrollObj.col[wndoId].load(lyrId, horizId);
                if (e && e.preventDefault) e.preventDefault();
                return false;
            }
        }(wndoId, lyrId, horizId) ); // see Crockford js good parts pg 39
    }
}
}

dw_scrollObj.prototype.setUpScrollControls = function(controlsId, autoHide, axis) {
var wndoId = this.id; var el = document.getElementById(controlsId); 
if ( autoHide && axis == 'v' || axis == 'h' ) {
    dw_scrollObj.handleControlVis(controlsId, wndoId, axis);
    dw_Scrollbar_Co.addEvent( this, 'on_load', function() { dw_scrollObj.handleControlVis(controlsId, wndoId, axis); } );
    dw_Scrollbar_Co.addEvent( this, 'on_update', function() { dw_scrollObj.handleControlVis(controlsId, wndoId, axis); } );
}

var links = el.getElementsByTagName('a'), cls, eType;
for (var i=0; links[i]; i++) { 
    cls = dw_scrollObj.get_DelimitedClass( links[i].className );
    eType = dw_scrollObj.getEv_FnType( cls.slice(0, cls.indexOf('_') ) );
    switch ( eType ) {
        case 'mouseover' :
        case 'mousedown' :
            dw_scrollObj.handleMouseOverDownLinks(links[i], wndoId, cls);
            break;
        case 'scrollToId': 
            dw_scrollObj.handleScrollToId(links[i], wndoId, cls);
            break;
        case 'scrollTo' :
        case 'scrollBy':
        case 'click': 
            dw_scrollObj.handleClick(links[i], wndoId, cls) ;
            break;
    }
}
}

dw_scrollObj.handleMouseOverDownLinks = function (linkEl, wndoId, cls) {
var parts = cls.split('_'); var eType = parts[0];
var re = /^(mouseover|mousedown)_(up|down|left|right)(_[\d]+)?$/;
            
if ( re.test(cls) ) { 
    var eAlt = (eType == 'mouseover')? 'mouseout': 'mouseup';
    var dir = parts[1];  var speed = parts[2] || null; 
    var deg = (dir == 'up')? 90: (dir == 'down')? 270: (dir == 'left')? 180: 0;
    
    dw_Event.add(linkEl, eType, function (e) { dw_scrollObj.col[wndoId].initScrollVals(deg, speed); } );
    dw_Event.add(linkEl, eAlt, function (e) { dw_scrollObj.col[wndoId].ceaseScroll(); } );
        
    if ( eType == 'mouseover') {
        dw_Event.add( linkEl, 'mousedown', function (e) { dw_scrollObj.col[wndoId].speed *= 3; } );
        dw_Event.add( linkEl, 'mouseup', function (e) { 
            dw_scrollObj.col[wndoId].speed = dw_scrollObj.prototype.speed; } ); 
    }
    dw_Event.add( linkEl, 'click', function(e) { if (e && e.preventDefault) e.preventDefault(); return false; } );
}
}

//scrollToId_smile, scrollToId_smile_100, scrollToId_smile_lyr1_100    
dw_scrollObj.handleScrollToId = function (linkEl, wndoId, cls) {
var parts = cls.split('_'); var id = parts[1], lyrId, dur;
if ( parts[2] ) {
    if ( isNaN( parseInt(parts[2]) ) ) { 
        lyrId = parts[2];
        dur = ( parts[3] && !isNaN( parseInt(parts[3]) ) )? parseInt(parts[3]): null;
    } else {
        dur = parseInt( parts[2] );
    }
}
dw_Event.add( linkEl, 'click', function (e) {
        dw_scrollObj.scrollToId(wndoId, id, lyrId, dur);
        if (e && e.preventDefault) e.preventDefault();
        return false;
    } );
}

//doesn't checks if lyrId in wndo, el in lyrId
dw_scrollObj.scrollToId = function(wndoId, id, lyrId, dur) {
var wndo = dw_scrollObj.col[wndoId];
var el = document.getElementById(id);
if (el) {
    if ( lyrId ) {
        if ( document.getElementById(lyrId) && wndo.lyrId != lyrId ) {
            wndo.load(lyrId);
        }
    }
    var lyr = document.getElementById(wndo.lyrId);
    var x = dw_getLayerOffset(el, lyr, 'left');
    var y = dw_getLayerOffset(el, lyr, 'top');
    wndo.initScrollToVals(x, y, dur);
}
}

dw_scrollObj.handleClick = function (linkEl, wndoId, cls) {
var wndo = dw_scrollObj.col[wndoId];
var parts = cls.split('_'); var eType = parts[0]; 
var dur_re = /^([\d]+)$/; var fn, re, x, y, dur;

switch (eType) {
    case 'scrollTo' :
        fn = 'scrollTo';  re = /^(null|end|[\d]+)$/;
        x = re.test( parts[1] )? parts[1]: '';
        y = re.test( parts[2] )? parts[2]: '';
        dur = ( parts[3] && dur_re.test(parts[3]) )? parts[3]: null;
        break;
    case 'scrollBy': // scrollBy_m30_m40, scrollBy_null_m100, scrollBy_100_null
        fn = 'scrollBy';  re = /^(([m]?[\d]+)|null)$/;
        x = re.test( parts[1] )? parts[1]: '';
        y = re.test( parts[2] )? parts[2]: '';
        
        // negate numbers (m not - but vice versa) 
        if ( !isNaN( parseInt(x) ) ) {
            x = -parseInt(x);
        } else if ( typeof x == 'string' ) {
            x = x.indexOf('m') !=-1 ? x.replace('m', ''): x;
        }
        if ( !isNaN( parseInt(y) ) ) {
            y = -parseInt(y);
        } else if ( typeof y == 'string' ) {
            y = y.indexOf('m') !=-1 ? y.replace('m', ''): y;
        }
        
        dur = ( parts[3] && dur_re.test(parts[3]) )? parts[3]: null;
        break;
    
    case 'click': 
        var o = dw_scrollObj.getClickParts(cls);
        fn = o.fn; x = o.x; y = o.y; dur = o.dur;
        break;
}
if ( x !== '' && y !== '' ) {
    if (x == 'end') { x = wndo.maxX; }
    if (y == 'end') { y = wndo.maxY; }
    if (x === 'null' || x === null) { x = wndo.x; }
    if (y === 'null' || y === null) { y = wndo.y; }
    
    x = parseInt(x); y = parseInt(y);  
    dur = !isNaN( parseInt(dur) )? parseInt(dur): null;
    
    if (fn == 'scrollBy') {
        dw_Event.add( linkEl, 'click', function (e) {
                dw_scrollObj.col[wndoId].initScrollByVals(x, y, dur);
                if (e && e.preventDefault) e.preventDefault();
                return false;
            } );
    } else if (fn == 'scrollTo') {
        dw_Event.add( linkEl, 'click', function (e) {
                dw_scrollObj.col[wndoId].initScrollToVals(x, y, dur);
                if (e && e.preventDefault) e.preventDefault();
                return false;
            } );
    }
}
}

//get info from className (e.g., click_down_by_100)
dw_scrollObj.getClickParts = function(cls) {
var parts = cls.split('_');
var re = /^(up|down|left|right)$/;
var dir, fn = '', dur, ar, val, x = '', y = '';

if ( parts.length >= 4 ) {
    ar = parts[1].match(re);
    dir = ar? ar[1]: null;
        
    re = /^(to|by)$/; 
    ar = parts[2].match(re);
    if (ar) {
        fn = (ar[0] == 'to')? 'scrollTo': 'scrollBy';
    } 

    val = parts[3]; // value on x or y axis
    re = /^([\d]+)$/;
    dur = ( parts[4] && re.test(parts[4]) )? parts[4]: null;

    switch (fn) {
        case 'scrollBy' :
            if ( !re.test( val ) ) {
                x = ''; y = ''; break;
            }
            switch (dir) { // 0 for unspecified axis 
                case 'up' : x = 0; y = val; break;
                case 'down' : x = 0; y = -val; break;
                case 'left' : x = val; y = 0; break;
                case 'right' : x = -val; y = 0;
             }
            break;
        case 'scrollTo' :
            re = /^(end|[\d]+)$/;
            if ( !re.test( val ) ) {
                x = ''; y = ''; break;
            }
            switch (dir) { // null for unspecified axis 
                case 'up' : x = null; y = val; break;
                case 'down' : x = null; y = (val == 'end')? val: -val; break;
                case 'left' : x = val; y = null; break;
                case 'right' : x = (val == 'end')? val: -val; y = null;
             } 
            break;
     }
}
return { fn: fn, x: x, y: y, dur: dur }
}

dw_scrollObj.getEv_FnType = function(str) {
var re = /^(mouseover|mousedown|scrollBy|scrollTo|scrollToId|click)$/;
if (re.test(str) ) {
    return str;
}
return '';
}

//return class name with underscores in it 
dw_scrollObj.get_DelimitedClass = function(cls) {
if ( cls.indexOf('_') == -1 ) {
    return '';
}
var whitespace = /\s+/;
if ( !whitespace.test(cls) ) {
    return cls;
} else {
    var classes = cls.split(whitespace); 
    for(var i = 0; classes[i]; i++) { 
        if ( classes[i].indexOf('_') != -1 ) {
            return classes[i];
        }
    }
}
}

dw_scrollObj.handleControlVis = function(controlsId, wndoId, axis) {
var wndo = dw_scrollObj.col[wndoId];
var el = document.getElementById(controlsId);
if ( ( axis == 'v' && wndo.maxY > 0 ) || ( axis == 'h' && wndo.maxX > 0 ) ) {
    el.style.visibility = 'visible';
} else {
    el.style.visibility = 'hidden';
}
}




