/*** click only once for forms ***/
function oneclick(theform){
if (document.all||document.getElementById){
  for (i=0;i<theform.length;i++){
  var tempobj=theform.elements[i]
    if(tempobj.type.toLowerCase()=="submit"||tempobj.type.toLowerCase()=="reset")
    tempobj.disabled=true
  }
} else
return false
}

/*** cannette Thacker http://www.shiningstar.net - Added into WebAPP by Aron Shiewitz for Forum Delete Confirmation Add-On.***/
function confirmSubmit()
{
var agree=confirm("Are you sure you wish to delete this?");
if (agree)
	return true;
else
	return false;
}
/***Contractible Headers script- © Dynamic Drive (www.dynamicdrive.com)***/

var enablepersist="off" //Enable saving state of content structure using session cookies? (on/off)
var collapseprevious="no" //Collapse previously open content when opening present? (yes/no)

if (document.getElementById){
document.write('<style type="text/css">')
document.write('.switchcontent{display:none;}')
document.write('</style>')
}

function getElementbyClass(classname){
ccollect=new Array()
var inc=0
var alltags=document.all? document.all : document.getElementsByTagName("*")
for (i=0; i<alltags.length; i++){
if (alltags[i].className==classname)
ccollect[inc++]=alltags[i]
}
}

function contractcontent(omit){
var inc=0
while (ccollect[inc]){
if (ccollect[inc].id!=omit)
ccollect[inc].style.display="none"
inc++
}
}

function expandcontent(cid){
if (typeof ccollect!="undefined"){
if (collapseprevious=="yes")
contractcontent(cid)
document.getElementById(cid).style.display=(document.getElementById(cid).style.display!="block")? "block" : "none"
}
}

function revivecontent(){
contractcontent("omitnothing")
selectedItem=getselectedItem()
selectedComponents=selectedItem.split("|")
for (i=0; i<selectedComponents.length-1; i++)
document.getElementById(selectedComponents[i]).style.display="block"
}

function get_cookie(Name) { 
var search = Name + "="
var returnvalue = "";
if (document.cookie.length > 0) {
offset = document.cookie.indexOf(search)
if (offset != -1) { 
offset += search.length
end = document.cookie.indexOf(";", offset);
if (end == -1) end = document.cookie.length;
returnvalue=unescape(document.cookie.substring(offset, end))
}
}
return returnvalue;
}

function getselectedItem(){
if (get_cookie(window.location.pathname) != ""){
selectedItem=get_cookie(window.location.pathname)
return selectedItem
}
else
return ""
}

function saveswitchstate(){
var inc=0, selectedItem=""
while (ccollect[inc]){
if (ccollect[inc].style.display=="block")
selectedItem+=ccollect[inc].id+"|"
inc++
}

document.cookie=window.location.pathname+"="+selectedItem
}

function do_onload(){
uniqueidn=window.location.pathname+"firsttimeload"
getElementbyClass("switchcontent")
if (enablepersist=="on" && typeof ccollect!="undefined"){
document.cookie=(get_cookie(uniqueidn)=="")? uniqueidn+"=1" : uniqueidn+"=0" 
firsttimeload=(get_cookie(uniqueidn)==1)? 1 : 0 //check if this is 1st page load
if (!firsttimeload)
revivecontent()
}
}


if (window.addEventListener)
window.addEventListener("load", do_onload, false)
else if (window.attachEvent)
window.attachEvent("onload", do_onload)
else if (document.getElementById)
window.onload=do_onload

if (enablepersist=="on" && document.getElementById)
window.onunload=saveswitchstate

// show site
var IE = document.all?true:false;if (!IE) document.captureEvents(Event.MOUSEMOVE);
document.onmousemove = getMouseXY;var mousex = 0;var mousey = 0; var sdd=0; var sddn=0; var stl=0; var llink = 0;var iwt_scrollleft=0;var iwt_scrolltop=0;
function getMouseXY(e) { if (document.documentElement.scrollLeft) { iwt_scrollleft = document.documentElement.scrollLeft; } else { iwt_scrollleft=document.body.scrollLeft; }
if (document.documentElement.scrollTop) { iwt_scrolltop = document.documentElement.scrollTop; } else { iwt_scrolltop=document.body.scrollTop; }
if (IE) {mousex = event.clientX+iwt_scrollleft;mousey = event.clientY + iwt_scrolltop;  } else { mousex = e.pageX;mousey = e.pageY;  }
if (mousex < 0){mousex = 0}  if (mousey < 0){mousey = 0}
} document.write('<div id="iwebtoolthumbnaildiv" style="position:absolute;visibility:hidden;z-index:9999;top:0;left:0;"></div>');
window.onload = function () {var x = document.getElementsByTagName('a');for (var i=0;i<x.length;i++)
{ x[i].onmouseover = function() { if (!sdd && !document.cookie.match("iwt_disable")) { showdd(this.getAttribute("href")); sdd=1; } }
x[i].onmousemove = function() { if (!sdd && !document.cookie.match("iwt_disable")) { sdd=1; showdd(this.getAttribute("href")); } }
x[i].onmouseout = function() { sdd=0; setTimeout("hidedd();",500); }	}}
function showdd(link){ var chkext=link.substr(0,4);
ddomain=document.location.href;ddomain=ddomain.replace("http://","");ddomain=ddomain.replace("https://","");ddomain=ddomain.replace("www.","");var ddomain=ddomain.split('/'); var ddomain = ddomain[0];
ldomain=link;ldomain=ldomain.replace("http://","");ldomain=ldomain.replace("https://","");var ldomain=ldomain.split('/'); var ldomain = ldomain[0];ldomainc=ldomain.replace("www.","");
if (ldomainc && ddomain && chkext=="http" && !ldomainc.match(ddomain)){chg=1; if (llink!==ddomain) {var bc =""; if (!bc) { bc="004891"; } document.getElementById('iwebtoolthumbnaildiv').innerHTML="<table width=\"210\" style=\"border-collapse: collapse;border: 1px solid #"+bc+";\" bgcolor=\"#ffffff\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" onmouseover=\"sddn=1;\" onmouseout=\"sddn=0;setTimeout('hidedd();',500);\"><tr><td style=\"padding:1px 1px 1px 1px;\" bgcolor=\"#"+bc+"\"><table cellpadding=\"0\" cellspacing=\"0\" style=\"border-collapse: collapse;\" width=\"100%\"><tr><td height=\"18\" style=\"padding:1px 1px 1px 1px;\"><font style=\"font-size:7pt;font-family:verdana,tahoma,arial;color:#ffffff;font-weight:bold;\">Website Preview</font></td><td style=\"padding:1px 1px 1px 1px;\" align=\"right\"><font style=\"font-size:7pt;color:#ffffff;font-weight:bold;font-family:verdana,tahoma,arial;\">[<a href=\"#\" style=\"font-size:7pt;text-decoration:underline;color:#ffffff;font-family:verdana,tahoma,arial;\" onclick=\"iwt_ds();return false;\">disable</a>]</font></td></tr></table></td></tr><tr><td style=\"padding:1px 1px 1px 1px;\"> <table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" style=\"border-collapse: collapse;\"><tr><td colspan=\"2\" height=\"150\" bgcolor=\"#F5F5F5\" style=\"padding:1px 1px 1px 1px;background-image: url('http://www.web-app.net/images/loading.gif'); background-repeat: no-repeat; background-position: center\" valign=\"top\"><a href=\""+link+"\" target=\"_target\"><img border=\"0\" style=\"border: solid #ffffff 1px\" onmouseover=\"this.style.borderColor='#"+bc+"'\" onmouseout=\"this.style.borderColor='#ffffff'\" alt=\"\" src=\"http://www.iwebtool2.com/img/?r="+encodeURIComponent(document.location.href)+"&domain="+encodeURIComponent(ldomain)+"\"></a></td></tr><tr><td style=\"padding:1px 1px 1px 1px;\"><div style=\"width:185;overflow:hidden;\"><a href=\""+link+"\" target=\"_target\" onmouseover=\"this.style.textDecoration='underline'\" onmouseout=\"this.style.textDecoration='none'\" style=\"font-weight:bold;text-decoration:none;font-family:verdana,tahoma,arial;font-size:8pt;color:#"+bc+";\">"+ldomainc+"</a></div></td><td style=\"padding:1px 1px 1px 1px;\" align=\"right\"><a title=\"Website Preview in Cooperation with IWEBTOOL and WebAPP\" href=\"http://www.web-app.net/cgi-bin/index.cgi?action=ver#iwebtools\" target=\"_blank\"><img border=\"0\" alt=\"?\" src=\"http://www.web-app.net/images/question.gif\"></a></td></tr></table></td></tr> </table>"; llink=ldomain; }
if (chg && !stl){ setTimeout("showddt();",700); }
else { if (window.innerWidth) { var cwidth=window.innerWidth; }else if (document.documentElement.clientWidth) { var cwidth=document.documentElement.clientWidth; }else if (document.body.clientWidth) { var cwidth=document.body.clientWidth; }
if (window.innerHeight) { var cheight=window.innerHeight; }else if (document.documentElement.clientHeight) { var cheight=document.documentElement.clientHeight; }else if (document.body.clientHeight) { var cheight=document.body.clientHeight; }
if ((mousex+230)>cwidth) { mousex=mousex-215; } else { mousex=mousex+5; } if ((mousey+210)>cheight+iwt_scrolltop) { mousey=mousey-200; } else { mousey=mousey+5; }
document.getElementById('iwebtoolthumbnaildiv').style.left=mousex+'px';document.getElementById('iwebtoolthumbnaildiv').style.top=mousey+'px'; }
} } function hidedd(){if (!sdd && !sddn) { document.getElementById('iwebtoolthumbnaildiv').innerHTML=""; document.getElementById('iwebtoolthumbnaildiv').style.visibility="hidden"; sdd=0; stl=0; }}
function showddt() { document.getElementById('iwebtoolthumbnaildiv').style.visibility='visible'; stl=1;
 if (window.innerWidth) { var cwidth=window.innerWidth; }else if (document.documentElement.clientWidth) { var cwidth=document.documentElement.clientWidth; }else if (document.body.clientWidth) { var cwidth=document.body.clientWidth; }
if (window.innerHeight) { var cheight=window.innerHeight; }else if (document.documentElement.clientHeight) { var cheight=document.documentElement.clientHeight; }else if (document.body.clientHeight) { var cheight=document.body.clientHeight; }
if ((mousex+230)>cwidth) { mousex=mousex-215; } else { mousex=mousex+5; } if ((mousey+210)>cheight+iwt_scrolltop) { mousey=mousey-200; } else { mousey=mousey+5; }
document.getElementById('iwebtoolthumbnaildiv').style.left=mousex+'px';document.getElementById('iwebtoolthumbnaildiv').style.top=mousey+'px'; }
function iwt_ds() { if (confirm("Would you like to disable website preview feature?")) { document.cookie = "iwt_disable=1"; } }
			