<!--

function displayWindow(url, width, height) {
        var Win = window.open(url,"displayWindow",'width=' + width + ',height=' + height + ',resizable=0,scrollbars=no, menubar=0,status=0,ScreenX=0,ScreenY=0,Top=0,Left=0' );
        Win.resizeTo(width + 25, height + 50);
        Win.focus();

}
function submit_artist_search ( artist_name ) {
	document.getElementById("txt_search").value=artist_name;
	document.frm_whatsnew_search.submit();
}
function submit_article_tag_search ( tag ) {
        document.getElementById("txt_search").value=tag;
	document.frm_article_tag_search.action = "/ht/sc/search_results";
        document.frm_article_tag_search.submit();
}
function submit_video_search ( cnt ) {
	var form_name = "frm_"+cnt+"_video";
        document.getElementById(form_name).action = "/ht/sc/video_gallery";
        document.getElementById(form_name).submit();
}
function submit_photo_search ( cnt ) {
	var form_name = "frm_"+cnt+"_photo";
        document.getElementById(form_name).action = "/ht/sc/pulse_parazzi";
        document.getElementById(form_name).submit();
}
function submit_gig_search ( cnt ) {
        var form_name = "frm_"+cnt+"_gig";
        document.getElementById(form_name).action = "/ht/sc/gig_guide";
        document.getElementById(form_name).submit();
}
function submit_cms_article_search ( article_id, task ) {
	var form_name = "frm_cms_article_search";
	document.getElementById("edit_id").value=article_id;

	if ( task == "edit" ) {
	        document.getElementById(form_name).action = "/ht/sc/cms/tsk/articles_frm";
	        document.getElementById(form_name).submit();
	}else if ( task == "delete" ) {
		var answer = confirm("Are you sure you want to delete Article with Id: "+article_id+"?");
		if (answer) {
			document.getElementById(form_name).action = "/ht/sc/cms/tsk/articles";
			document.getElementById(form_name).submit();
		}
	}else{
		document.getElementById(form_name).action = "/ht/sc/cms/tsk/rel_dls_frm";
                document.getElementById(form_name).submit();
	}
}
function submit_cms_poll_search ( poll_id, task ) {
        var form_name = "frm_cms_poll_search";
        document.getElementById("edit_id").value=poll_id;

        if ( task == "edit" ) {
                document.getElementById(form_name).action = "/ht/sc/cms/tsk/polls_frm";
                document.getElementById(form_name).submit();
        }else{
                var answer = confirm("Are you sure you want to delete Poll Question with Id: "+poll_id+"?");
                if (answer) {
                        document.getElementById(form_name).action = "/ht/sc/cms/tsk/polls";
                        document.getElementById(form_name).submit();
                }
        }
}
function submit_cms_comment_search ( comment_id, task ) {
        var form_name = "frm_cms_comment_search";
        document.getElementById("edit_id").value=comment_id;
	document.getElementById("edit_task").value=task;

        if ( task == "edit" ) {
		var answer1 = confirm("Are you sure you want to approve Comment with Id: "+comment_id+"?");
		if (answer1) {
	                document.getElementById(form_name).action = "/ht/sc/cms/tsk/comments";
        	        document.getElementById(form_name).submit();
		}
        }else{
                var answer2 = confirm("Are you sure you want to delete Comment with Id: "+comment_id+"?");
                if (answer2) {
                        document.getElementById(form_name).action = "/ht/sc/cms/tsk/comments";
                        document.getElementById(form_name).submit();
                }
        }
}
function submit_cms_dls_unset ( task ) {
        var form_name = "frm_cms_"+task;

        if ( task == "rdls" ) {
                var answer1 = confirm("Are you sure you want to remove those checked items from this article's related downloads list?");
                if (answer1) {
			document.getElementById(form_name).action = "/ht/sc/cms/tsk/rel_dls_frm";
                        document.getElementById(form_name).submit();
                }
        }else{
                var answer2 = confirm("Are you sure you want to remove those checked items from the list of Top Downloads?");
		if (answer2) {
			document.getElementById(form_name).action = "/ht/sc/cms/tsk/mob_dls_frm";
                        document.getElementById(form_name).submit();
		}
        }
}

/***********************************************
    Pag clear ng TXT napulot ni oliver sa net
************************************************/

function clearText(thefield) {
       if (thefield.defaultValue == thefield.value) {
               thefield.value = ""
       }
}

/*****************************************************************************

function name           : add_poll_choice
function details        : Function for showing choices for polling server of
			  PULSE. Requires div_added_poll_choices and hdn_choice_count

author                  : Oliver Arce
creation date           : Thu Oct 18 14:33:34 PHT 2007
parameters              : None
                          
return value            : Form elements [inputbox and fileupload]

******************************************************************************/
function add_poll_choice( ) {
        var str_html_return = "";
	var num_choices = eval(document.getElementById("hdn_choice_count").value) + 1;
	var arr_values = new Array();
	var arr_icon_values = new Array();

        if (num_choices > 0) {
                for (i=1;i<=num_choices;i++) {
                       	str_html_return += '<tr><td>'+i+'</td><td><input id="choice_'+i+'" name="choice_'+i+'" type="text" size=40> <a href="javascript:remove_poll_choice('+i+','+num_choices+');">Remove</a></td></tr><tr><td>icon</td><td><input id="choice_icon_'+i+'" name="choice_icon_'+i+'" type="file" size=40></td></tr><tr><td colspan=2>&nbsp;</td></tr>';
                }

		if (num_choices > 1){
			for (i=1;i<num_choices;i++) {
				arr_values[i] = document.getElementById("choice_"+i).value;
				arr_icon_values[i] = document.getElementById("choice_icon_"+i).value;
			}
		}

                document.getElementById("div_added_poll_choices").innerHTML = str_html_return;
		document.getElementById("hdn_choice_count").value = num_choices;

		if (num_choices > 1){
                        for (i=1;i<num_choices;i++) {
				document.getElementById("choice_"+i).value = arr_values[i];
				document.getElementById("choice_icon_"+i).value = arr_icon_values[i];
			}
		}
        }

}

function remove_poll_choice( remove_choice_num, num_choices ) {
	var str_html_return = "";
	var arr_values = new Array();
	var arr_icon_values = new Array();
	var j = 1;


		var num_new_choices = num_choices - 1;
		
		document.getElementById("hdn_choice_count").value = num_new_choices;		

		for ( i=1; i<=num_choices; i++ ) {
			if ( i != remove_choice_num ) {
				arr_values[j] = document.getElementById("choice_"+i).value;
				//arr_icon_values[j] = document.getElementById("choice_icon_"+j).value;
				j++;
			}
		}

		for ( i=1; i<num_choices; i++ ) {
			str_html_return += '<tr><td>'+i+'</td><td><input id="choice_'+i+'" name="choice_'+i+'" type="text" size=40> <a href="javascript:remove_poll_choice('+i+','+num_new_choices+');">Remove</a></td></tr><tr><td>icon</td><td><input id="choice_icon_'+i+'" name="choice_icon_'+i+'" type="file" size=40></td></tr><tr><td colspan=2>&nbsp;</td></tr>';
                }
		
		document.getElementById("div_added_poll_choices").innerHTML = str_html_return;
		
		for ( i=1; i<num_choices; i++ ) {
			document.getElementById("choice_"+i).value = arr_values[i];
			//document.getElementById("choice_icon_"+i).value = arr_icon_values[i];
		}
}


/*****************************************************************************

function name           : toggle_search_divs
function details        : Function for toggling search DIV under Advance Search
			  of Pulse.

author                  : Oliver Arce
creation date           : Wed Sep 26 13:47:03 PHT 2007
parameters              : ['All', 'Articles', 'Reviews', 'Mobile', 'Gigs']
			  ['Photos', 'Vidoes']
return value            : Toggled DIV tags

******************************************************************************/

function toggle_search_divs ( main_option_value ) {
	var arr_main_option_values = new Array("articles","mobile","rates","gigs");
        var lc_main_option_value = main_option_value.toLowerCase();

        if (lc_main_option_value == "all") {
                for(i=0;i<arr_main_option_values.length;i++) {
                        document.getElementById("div_search_for_"+arr_main_option_values[i]).style.display = "block";
			toggle_sub_divs("subdiv_search_for_"+arr_main_option_values[i]);
                }
	}else if (lc_main_option_value == "photos" || lc_main_option_value == "videos") {
		for(i=0;i<arr_main_option_values.length;i++) {
                        document.getElementById("div_search_for_"+arr_main_option_values[i]).style.display = "none";
			toggle_sub_divs("subdiv_search_for_"+arr_main_option_values[i]);
                }
        }else{
                for(i=0;i<arr_main_option_values.length;i++) {
                        if ( lc_main_option_value == arr_main_option_values[i]) {
                                document.getElementById("div_search_for_"+arr_main_option_values[i]).style.display = "block";
                        }else{
                                document.getElementById("div_search_for_"+arr_main_option_values[i]).style.display = "none";
                        }
			toggle_sub_divs("subdiv_search_for_"+arr_main_option_values[i]);
                }
        }

}

function toggle_sub_divs(targ){

	var curr_status = document.getElementById(targ).style.display;

	if ( curr_status == "block" ) {
		document.getElementById(targ).style.display = "none";
	} else {
		document.getElementById(targ).style.display = "block";
	}

}


/*****************************************************************************

function name           : toggle_results_divs
function details        : Function for toggling search results DIV under 
                          Advance Search of Pulse.

author                  : Oliver Arce
creation date           : Sun Sep 30 22:09:38 PHT 2007
parameters              : ['All', 'Articles', 'Reviews', 'Mobile', 'Gigs']
			  ['Photos', 'Vidoes']
return value            : Toggled DIV tags

******************************************************************************/

function toggle_results_divs ( main_option_value ) {
	var arr_main_option_values = new Array("articles","mobile","rates","gigs","photos","videos");
	var lc_main_option_value = main_option_value.toLowerCase();

        if (lc_main_option_value == "all") {
		for(i=0;i<arr_main_option_values.length;i++) {
			document.getElementById("div_results_for_"+arr_main_option_values[i]).style.display = "block";
		}
        }else{
		for(i=0;i<arr_main_option_values.length;i++) {
			if ( lc_main_option_value == arr_main_option_values[i]) {
				document.getElementById("div_results_for_"+arr_main_option_values[i]).style.display = "block";
			}else{
				document.getElementById("div_results_for_"+arr_main_option_values[i]).style.display = "none";
			}
                }
        }

}



/*****************************************************************************

function name           : set_day_options
function details        : Function for setting DAY options on a SELECT tag
                         based on values selected from MONTH and YEAR SELECT
                         tags.

author                  : ???
creation date           : ???
parameters              : SELECT tag Ids (<year>, <month>, <day>)
return value            : Day options

modifications
      date            : Thu Jun 28 15:56:29 PHT 2007
      modified by     : Oliver Arce
      description     : To set parameters

******************************************************************************/

function set_day_options(year_sltid, month_sltid, day_sltid) {

       var day
       var month = document.getElementById(month_sltid).value
       var year  = document.getElementById(year_sltid).value

       if (month == "2") {
               day = (parseInt(year)%4 != 0) ? 28 : 29
       }
       else if (month=="4" || month=="6" || month=="9" || month=="11") {
               day = 30
       }
       else {
               day = 31
       }

       document.getElementById(day_sltid).options.length = 0

       for (i=0; i<day; i++) {
               j = (i < 9) ? "0" : "";
               k = i + 1;
               document.getElementById(day_sltid).options[i] = new Option(k,j+k);
       }

}


/*
 Pleas leave this notice.
 DHTML tip message version 1.2 copyright Essam Gamal 2003 (http://migoicons.tripod.com, migoicons@hotmail.com)
 All modifications are done in the style.js you should not modify this file.  Created on : 06/03/2003
 Script featured on and can be found at Dynamic Drive (http://www.dynamicdrive.com)
*/

var ua = navigator.userAgent
var ps = navigator.productSub
var dom = (document.getElementById)? 1:0
var ie4 = (document.all&&!dom)? 1:0
var ie5 = (document.all&&dom)? 1:0
var nn4 =(navigator.appName.toLowerCase() == "netscape" && parseInt(navigator.appVersion) == 4)
var nn6 = (dom&&!ie5)? 1:0
var sNav = (nn4||nn6||ie4||ie5)? 1:0
var cssFilters = ((ua.indexOf("MSIE 5.5")>=0||ua.indexOf("MSIE 6")>=0)&&ua.indexOf("Opera")<0)? 1:0
var Style=[],Text=[],Count=0,sbw=0,move=0,hs="",mx,my,scl,sct,ww,wh,obj,sl,st,ih,iw,vl,hl,sv,evlh,evlw,tbody
var HideTip = "eval(obj+sv+hl+';'+obj+sl+'=0;'+obj+st+'=-800')"
var doc_root = ((ie5&&ua.indexOf("Opera")<0||ie4)&&document.compatMode=="CSS1Compat")? "document.documentElement":"document.body"
var PX = (nn6)? "px" :""

if(sNav) {
        window.onresize = ReloadTip
        document.onmousemove = MoveTip
        if(nn4) document.captureEvents(Event.MOUSEMOVE)
}
if(nn4||nn6) {
        mx = "e.pageX"
        my = "e.pageY"
        scl = "window.pageXOffset"
        sct = "window.pageYOffset"
        if(nn4) {
                obj = "document.TipLayer."
                sl = "left"
                st = "top"
                ih = "clip.height"
                iw = "clip.width"
                vl = "'show'"
                hl = "'hide'"
                sv = "visibility="
        }
        else obj = "document.getElementById('TipLayer')."
}
if(ie4||ie5) {
        obj = "TipLayer."
        mx = "event.x"
        my = "event.y"
        scl = "eval(doc_root).scrollLeft"
        sct = "eval(doc_root).scrollTop"
        if(ie5) {
                mx = mx+"+"+scl
                my = my+"+"+sct
        }

}
if(ie4||dom){
        sl = "style.left"
        st = "style.top"
        ih = "offsetHeight"
        iw = "offsetWidth"
        vl = "'visible'"
        hl = "'hidden'"
        sv = "style.visibility="
}
if(ie4||ie5||ps>=20020823) {
        ww = "eval(doc_root).clientWidth"
        wh = "eval(doc_root).clientHeight"
}
else {
        ww = "window.innerWidth"
        wh = "window.innerHeight"
        evlh = eval(wh)
        evlw = eval(ww)
        sbw=15
}

function applyCssFilter(){
        if(cssFilters&&FiltersEnabled) {
                var dx = " progid:DXImageTransform.Microsoft."
                TipLayer.style.filter = "revealTrans()"+dx+"Fade(Overlap=1.00 enabled=0)"+dx+"Inset(enabled=0)"+dx+"Iris(irisstyle=PLUS,motion=in enabled=0)"+dx+"Iris(irisstyle=PLUS,motion=out enabled=0)"+dx+"Iris(irisstyle=DIAMOND,motion=in enabled=0)"+dx+"Iris(irisstyle=DIAMOND,motion=out enabled=0)"+dx+"Iris(irisstyle=CROSS,motion=in enabled=0)"+dx+"Iris(irisstyle=CROSS,motion=out enabled=0)"+dx+"Iris(irisstyle=STAR,motion=in enabled=0)"+dx+"Iris(irisstyle=STAR,motion=out enabled=0)"+dx+"RadialWipe(wipestyle=CLOCK enabled=0)"+dx+"RadialWipe(wipestyle=WEDGE enabled=0)"+dx+"RadialWipe(wipestyle=RADIAL enabled=0)"+dx+"Pixelate(MaxSquare=35,enabled=0)"+dx+"Slide(slidestyle=HIDE,Bands=25 enabled=0)"+dx+"Slide(slidestyle=PUSH,Bands=25 enabled=0)"+dx+"Slide(slidestyle=SWAP,Bands=25 enabled=0)"+dx+"Spiral(GridSizeX=16,GridSizeY=16 enabled=0)"+dx+"Stretch(stretchstyle=HIDE enabled=0)"+dx+"Stretch(stretchstyle=PUSH enabled=0)"+dx+"Stretch(stretchstyle=SPIN enabled=0)"+dx+"Wheel(spokes=16 enabled=0)"+dx+"GradientWipe(GradientSize=1.00,wipestyle=0,motion=forward enabled=0)"+dx+"GradientWipe(GradientSize=1.00,wipestyle=0,motion=reverse enabled=0)"+dx+"GradientWipe(GradientSize=1.00,wipestyle=1,motion=forward enabled=0)"+dx+"GradientWipe(GradientSize=1.00,wipestyle=1,motion=reverse enabled=0)"+dx+"Zigzag(GridSizeX=8,GridSizeY=8 enabled=0)"+dx+"Alpha(enabled=0)"+dx+"Dropshadow(OffX=3,OffY=3,Positive=true,enabled=0)"+dx+"Shadow(strength=3,direction=135,enabled=0)"
        }
}


function stm(t,s,bg,brd,q) {
	
	//alert("t: '"+t +"'\n\n s: '"+ s +"'\n\n bg: '"+ bg +"'\n\n brd: '"+ brd +"'\n\n q: '"+ q + "'");

  if(sNav) {
        if(t.length<2||s.length<25) {
                var ErrorNotice = "DHTML TIP MESSAGE VERSION 1.2 ERROR NOTICE.\n"
                if(t.length<2&&s.length<25) alert(ErrorNotice+"It looks like you removed an entry or more from the Style Array and Text Array of this tip.\nTheir should be 25 entries in every Style Array even though empty and 2 in every Text Array. You defined only "+s.length+" entries in the Style Array and "+t.length+" entry in the Text Array. This tip won't be viewed to avoid errors")
                else if(t.length<2) alert(ErrorNotice+"It looks like you removed an entry or more from the Text Array of this tip.\nTheir should be 2 entries in every Text Array. You defined only "+t.length+" entry. This tip won't be viewed to avoid errors.")
                else if(s.length<25) alert(ErrorNotice+"It looks like you removed an entry or more from the Style Array of this tip.\nTheir should be 25 entries in every Style Array even though empty. You defined only "+s.length+" entries. This tip won't be viewed to avoid errors.")
        }
        else {
                var ab = "" ;var ap = ""
                var titCol = (s[0])? "COLOR='"+s[0]+"'" : ""
                var txtCol = (s[1])? "COLOR='"+s[1]+"'" : ""
                var titBgCol = (s[2])? "BGCOLOR='"+brd+"'" : ""
                var txtBgCol = (s[3])? "BGCOLOR='"+bg+"'" : ""
                var titBgImg = (s[4])? "BACKGROUND='"+s[4]+"'" : ""
                var txtBgImg = (s[5])? "BACKGROUND='"+s[5]+"'" : ""
                var titTxtAli = (s[6] && s[6].toLowerCase()!="left")? "ALIGN='"+s[6]+"'" : ""
                var txtTxtAli = (s[7] && s[7].toLowerCase()!="left")? "ALIGN='"+s[7]+"'" : ""
                var add_height = (s[15])? "HEIGHT='"+s[15]+"'" : ""
                if(!s[8])  s[8] = "Verdana,Arial,Helvetica"
                if(!s[9])  s[9] = "Verdana,Arial,Helvetica"
                if(!s[12]) s[12] = 1
                if(!s[13]) s[13] = 1
                if(!s[14]) s[14] = 200
                if(!s[16]) s[16] = 0
                if(!s[17]) s[17] = 0
                if(!s[18]) s[18] = 10
                if(!s[19]) s[19] = 10
                hs = s[11].toLowerCase()
                if(ps==20001108){
                if(s[2]) ab="STYLE='border:"+s[16]+"px solid"+" "+s[2]+"'"
                ap="STYLE='padding:"+s[17]+"px "+s[17]+"px "+s[17]+"px "+s[17]+"px'"}
                var closeLink=(hs=="sticky")? "<TD ALIGN='right'><FONT SIZE='"+s[12]+"' FACE='"+s[8]+"'><A HREF='javascript:void(0)' ONCLICK='stickyhide()' STYLE='text-decoration:none;color:"+s[0]+"'><B>Close</B></A></FONT></TD>":""
                var title=(t[0]||hs=="sticky")? "<TABLE WIDTH='100%' BORDER='0' CELLPADDING='0' CELLSPACING='0'><TR><TD "+titTxtAli+"><FONT SIZE='"+s[12]+"' FACE='"+s[8]+"' "+titCol+"><B>"+t[0]+"</B></FONT></TD>"+closeLink+"</TR></TABLE>" : ""
                var txt="<TABLE "+titBgImg+" "+ab+" WIDTH='"+s[14]+"' BORDER='0' CELLPADDING='"+s[16]+"' CELLSPACING='0' "+titBgCol+" ><TR><TD>"+title+"<TABLE WIDTH='100%' "+add_height+" BORDER='0' CELLPADDING='"+s[17]+"' CELLSPACING='0' "+txtBgCol+" "+txtBgImg+"><TR><TD "+txtTxtAli+" "+ap+" VALIGN='top'><FONT SIZE='"+s[13]+"' FACE='"+s[9]+"' "+txtCol +">"+q+"</FONT></TD></TR></TABLE></TD></TR></TABLE>"
                if(nn4) {
                        with(eval(obj+"document")) {
                                open()
                                write(txt)
                                close()
                        }
                }
                else eval(obj+"innerHTML=txt")
                tbody = {
                        Pos:s[10].toLowerCase(),
                        Xpos:s[18],
                        Ypos:s[19],
                        Transition:s[20],
                        Duration:s[21],
                        Alpha:s[22],
                        ShadowType:s[23].toLowerCase(),
                        ShadowColor:s[24],
                        Width:parseInt(eval(obj+iw)+3+sbw)
                }
                if(ie4) {
                        TipLayer.style.width = s[14]
                        tbody.Width = s[14]
                }
                Count=0
                move=1
         }
  }
}

function MoveTip(e) {
        if(move) {
                var X,Y,MouseX = eval(mx),MouseY = eval(my); tbody.Height = parseInt(eval(obj+ih)+3)
                tbody.wiw = parseInt(eval(ww+"+"+scl)); tbody.wih = parseInt(eval(wh+"+"+sct))
                switch(tbody.Pos) {
                        case "left" : X=MouseX-tbody.Width-tbody.Xpos; Y=MouseY+tbody.Ypos; break
                        case "center": X=MouseX-(tbody.Width/2); Y=MouseY+tbody.Ypos; break
                        case "float": X=tbody.Xpos+eval(scl); Y=tbody.Ypos+eval(sct); break
                        case "fixed": X=tbody.Xpos; Y=tbody.Ypos; break
                        default: X=MouseX+tbody.Xpos; Y=MouseY+tbody.Ypos
                }

                if(tbody.wiw<tbody.Width+X) X = tbody.wiw-tbody.Width
                if(tbody.wih<tbody.Height+Y+sbw) {
                        if(tbody.Pos=="float"||tbody.Pos=="fixed") Y = tbody.wih-tbody.Height-sbw
                        else Y = MouseY-tbody.Height
                }
                if(X<0) X=0
                eval(obj+sl+"=X+PX;"+obj+st+"=Y+PX")
                ViewTip()
        }
}

function ViewTip() {
        Count++
        if(Count == 1) {
                if(cssFilters&&FiltersEnabled) {
                        for(Index=28; Index<31; Index++) { TipLayer.filters[Index].enabled = 0 }
                        for(s=0; s<28; s++) { if(TipLayer.filters[s].status == 2) TipLayer.filters[s].stop() }
                        if(tbody.Transition == 51) tbody.Transition = parseInt(Math.random()*50)
                        var applyTrans = (tbody.Transition>-1&&tbody.Transition<24&&tbody.Duration>0)? 1:0
                        var advFilters = (tbody.Transition>23&&tbody.Transition<51&&tbody.Duration>0)? 1:0
                        var which = (applyTrans)?0:(advFilters)? tbody.Transition-23:0
                        if(tbody.Alpha>0&&tbody.Alpha<100) {
                                TipLayer.filters[28].enabled = 1
                                TipLayer.filters[28].opacity = tbody.Alpha
                        }
                        if(tbody.ShadowColor&&tbody.ShadowType == "simple") {
                                TipLayer.filters[29].enabled = 1
                                TipLayer.filters[29].color = tbody.ShadowColor
                        }
                        else if(tbody.ShadowColor&&tbody.ShadowType == "complex") {
                                TipLayer.filters[30].enabled = 1
                                TipLayer.filters[30].color = tbody.ShadowColor
                        }
                        if(applyTrans||advFilters) {
                                eval(obj+sv+hl)
                                if(applyTrans) TipLayer.filters[0].transition = tbody.Transition
                                TipLayer.filters[which].duration = tbody.Duration
                                TipLayer.filters[which].apply()
                        }
                }
                eval(obj+sv+vl)
                if(cssFilters&&FiltersEnabled&&(applyTrans||advFilters)) TipLayer.filters[which].play()
                if(hs == "sticky") move=0
        }
}

function stickyhide() {
        eval(HideTip)
}

function ReloadTip() {
         if(nn4&&(evlw!=eval(ww)||evlh!=eval(wh))) location.reload()
         else if(hs == "sticky") eval(HideTip)
}


function htm() {
        if(sNav) {
                if(hs!="keep") {
                        move=0;
                        if(hs!="sticky") eval(HideTip)
                }
        }
}


//simple tree view menu

var persisteduls=new Object()
var ddtreemenu=new Object()

ddtreemenu.closefolder="images/general/list_bullet.gif" //set image path to "closed" folder image
ddtreemenu.openfolder="images/general/list_bullet.gif" //set image path to "open" folder image

//No need to edit beyond here

ddtreemenu.createTree=function(treeid, enablepersist, persistdays){
var ultags=document.getElementById(treeid).getElementsByTagName("ul")
if (typeof persisteduls[treeid]=="undefined")
persisteduls[treeid]=(enablepersist==true && ddtreemenu.getCookie(treeid)!="")? ddtreemenu.getCookie(treeid).split(",") : ""
for (var i=0; i<ultags.length; i++)
ddtreemenu.buildSubTree(treeid, ultags[i], i)
if (enablepersist==true){ //if enable persist feature
var durationdays=(typeof persistdays=="undefined")? 1 : parseInt(persistdays)
ddtreemenu.dotask(window, function(){ddtreemenu.rememberstate(treeid, durationdays)}, "unload") //save opened UL indexes on body unload
}
}

ddtreemenu.buildSubTree=function(treeid, ulelement, index){
ulelement.parentNode.className="submenu"
if (typeof persisteduls[treeid]=="object"){ //if cookie exists (persisteduls[treeid] is an array versus "" string)
if (ddtreemenu.searcharray(persisteduls[treeid], index)){
ulelement.setAttribute("rel", "open")
ulelement.style.display="block"
ulelement.parentNode.style.backgroundImage="url("+ddtreemenu.openfolder+")"
}
else
ulelement.setAttribute("rel", "closed")
} //end cookie persist code
else if (ulelement.getAttribute("rel")==null || ulelement.getAttribute("rel")==false) //if no cookie and UL has NO rel attribute explicted added by user
ulelement.setAttribute("rel", "closed")
else if (ulelement.getAttribute("rel")=="open") //else if no cookie and this UL has an explicit rel value of "open"
ddtreemenu.expandSubTree(treeid, ulelement) //expand this UL plus all parent ULs (so the most inner UL is revealed!)
ulelement.parentNode.onclick=function(e){
var submenu=this.getElementsByTagName("ul")[0]
if (submenu.getAttribute("rel")=="closed"){
submenu.style.display="block"
submenu.setAttribute("rel", "open")
ulelement.parentNode.style.backgroundImage="url("+ddtreemenu.openfolder+")"
}
else if (submenu.getAttribute("rel")=="open"){
submenu.style.display="none"
submenu.setAttribute("rel", "closed")
ulelement.parentNode.style.backgroundImage="url("+ddtreemenu.closefolder+")"
}
ddtreemenu.preventpropagate(e)
}
ulelement.onclick=function(e){
ddtreemenu.preventpropagate(e)
}
}

ddtreemenu.expandSubTree=function(treeid, ulelement){ //expand a UL element and any of its parent ULs
var rootnode=document.getElementById(treeid)
var currentnode=ulelement
currentnode.style.display="block"
currentnode.parentNode.style.backgroundImage="url("+ddtreemenu.openfolder+")"
while (currentnode!=rootnode){
if (currentnode.tagName=="UL"){ //if parent node is a UL, expand it too
currentnode.style.display="block"
currentnode.setAttribute("rel", "open") //indicate it's open
currentnode.parentNode.style.backgroundImage="url("+ddtreemenu.openfolder+")"
}
currentnode=currentnode.parentNode
}
}

ddtreemenu.flatten=function(treeid, action){ //expand or contract all UL elements
var ultags=document.getElementById(treeid).getElementsByTagName("ul")
for (var i=0; i<ultags.length; i++){
ultags[i].style.display=(action=="expand")? "block" : "none"
var relvalue=(action=="expand")? "open" : "closed"
ultags[i].setAttribute("rel", relvalue)
ultags[i].parentNode.style.backgroundImage=(action=="expand")? "url("+ddtreemenu.openfolder+")" : "url("+ddtreemenu.closefolder+")"
}
}

ddtreemenu.rememberstate=function(treeid, durationdays){ //store index of opened ULs relative to other ULs in Tree into cookie
var ultags=document.getElementById(treeid).getElementsByTagName("ul")
var openuls=new Array()
for (var i=0; i<ultags.length; i++){
if (ultags[i].getAttribute("rel")=="open")
openuls[openuls.length]=i //save the index of the opened UL (relative to the entire list of ULs) as an array element
}
if (openuls.length==0) //if there are no opened ULs to save/persist
openuls[0]="none open" //set array value to string to simply indicate all ULs should persist with state being closed
ddtreemenu.setCookie(treeid, openuls.join(","), durationdays) //populate cookie with value treeid=1,2,3 etc (where 1,2... are the indexes of the opened ULs)
}

//A few utility functions below

ddtreemenu.getCookie=function(Name){ //get cookie value
var re=new RegExp(Name+"=[^;]+", "i"); //construct RE to search for target name/value pair
if (document.cookie.match(re)) //if cookie found
return document.cookie.match(re)[0].split("=")[1] //return its value
return ""
}

ddtreemenu.setCookie=function(name, value, days){ //set cookei value
var expireDate = new Date()
//set "expstring" to either future or past date, to set or delete cookie, respectively
var expstring=expireDate.setDate(expireDate.getDate()+parseInt(days))
document.cookie = name+"="+value+"; expires="+expireDate.toGMTString()+"; path=/";
}

ddtreemenu.searcharray=function(thearray, value){ //searches an array for the entered value. If found, delete value from array
var isfound=false
for (var i=0; i<thearray.length; i++){
if (thearray[i]==value){
isfound=true
thearray.shift() //delete this element from array for efficiency sake
break
}
}
return isfound
}

ddtreemenu.preventpropagate=function(e){ //prevent action from bubbling upwards
if (typeof e!="undefined")
e.stopPropagation()
else
event.cancelBubble=true
}

ddtreemenu.dotask=function(target, functionref, tasktype){ //assign a function to execute to an event handler (ie: onunload)
var tasktype=(window.addEventListener)? tasktype : "on"+tasktype
if (target.addEventListener)
target.addEventListener(tasktype, functionref, false)
else if (target.attachEvent)
target.attachEvent(tasktype, functionref)
}



//-->
