/***********************************************
* Cool DHTML tooltip script- © Dynamic Drive DHTML code library (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code
***********************************************/

var offsetxpoint=-60 //Customize x offset of tooltip
var offsetypoint=20 //Customize y offset of tooltip
var ie=document.all
var ns6=document.getElementById && !document.all
var enabletip=false

var tipobj;
function getToolTipObject() {
if (tipobj == null) {
if (ie||ns6) {
tipobj=document.all? document.all["dhtmltooltip"] : document.getElementById? document.getElementById("dhtmltooltip") : ""
}
}
return tipobj;
}

function ietruebody(){
return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}

function ddrivetip(thetext, thecolor, thewidth){
if (ns6||ie){
//alert(thetext);
//alert(thecolor);
//alert(thewidth);

if (typeof thewidth!="undefined") getToolTipObject().style.width=thewidth+"px"
if (typeof thecolor!="undefined" && thecolor!="") getToolTipObject().style.backgroundColor=thecolor
getToolTipObject().innerHTML=thetext

enabletip=true
return false
}
}

function positiontip(e){
if (enabletip){
var curX=(ns6)?e.pageX : event.clientX+ietruebody().scrollLeft;
var curY=(ns6)?e.pageY : event.clientY+ietruebody().scrollTop;
//Find out how close the mouse is to the corner of the window
var rightedge=ie&&!window.opera? ietruebody().clientWidth-event.clientX-offsetxpoint : window.innerWidth-e.clientX-offsetxpoint-20
var bottomedge=ie&&!window.opera? ietruebody().clientHeight-event.clientY-offsetypoint : window.innerHeight-e.clientY-offsetypoint-20

var leftedge=(offsetxpoint<0)? offsetxpoint*(-1) : -1000

//if the horizontal distance isn't enough to accomodate the width of the context menu
if (rightedge<getToolTipObject().offsetWidth)
//move the horizontal position of the menu to the left by it's width
getToolTipObject().style.left=ie? ietruebody().scrollLeft+event.clientX-getToolTipObject().offsetWidth+"px" : window.pageXOffset+e.clientX-getToolTipObject().offsetWidth+"px"
else if (curX<leftedge)
getToolTipObject().style.left="5px"
else
//position the horizontal position of the menu where the mouse is positioned
getToolTipObject().style.left=curX+offsetxpoint+"px"

//same concept with the vertical position
if (bottomedge<getToolTipObject().offsetHeight)
getToolTipObject().style.top=ie? ietruebody().scrollTop+event.clientY-getToolTipObject().offsetHeight-offsetypoint+"px" : window.pageYOffset+e.clientY-getToolTipObject().offsetHeight-offsetypoint+"px"
else
getToolTipObject().style.top=curY+offsetypoint+"px"
getToolTipObject().style.visibility="visible"
}
}

function hideddrivetip(){
if (ns6||ie){
enabletip=false
getToolTipObject().style.visibility="hidden"
getToolTipObject().style.left="-1000px"
getToolTipObject().style.backgroundColor=''
getToolTipObject().style.width=''
}
}

document.onmousemove=positiontip;

function rvar(){var ddndt = new Date();      var strVariable = Math.round(ddndt.getTimezoneOffset()/60) + 'DDS' + ddndt.getTime()+'-'+Math.random();          return strVariable;}

function ad_script(s,a,t,p,as){var strTag;var strRandomVariable=rvar();var strAdDetail = 'site=' + s + '&affiliate='+ a + '&target=' + t + '&position=' + p + '&adsize=' + as + '&number='+ strRandomVariable;strTag = ('<' + 'SCRIPT LANGUAGE="JavaScript1.1" SRC="http://a.coza.com/js.ng/'+ strAdDetail +'"></' + 'script>');strTag += ('<NOSCRIPT><A HREF="http://a.coza.com/click.ng/' + strAdDetail + '">');strTag += ('<IMG SRC="http://a.coza.com/image.ng/' + strAdDetail + '"></A></NOSCRIPT>');document.write(strTag);}




/***********************************************
* Overlapping Content link- © Dynamic Drive (www.dynamicdrive.com)
* This notice must stay intact for legal use.
* Visit http://www.dynamicdrive.com/ for full source code
***********************************************/

function getposOffset(overlay, offsettype){
var totaloffset=(offsettype=="left")? overlay.offsetLeft : overlay.offsetTop;
var parentEl=overlay.offsetParent;
while (parentEl!=null){
totaloffset=(offsettype=="left")? totaloffset+parentEl.offsetLeft : totaloffset+parentEl.offsetTop;
parentEl=parentEl.offsetParent;
}
return totaloffset;
}

function overlay(curobj, subobj)
{
    if (document.getElementById)
    {
        var subobj=document.getElementById(subobj);
        subobj.style.left=getposOffset(curobj, "left")+"px";
        subobj.style.top=getposOffset(curobj, "top")+"px";
        subobj.style.display="block";
        return false;
    }
    else
    {
        return true;
    }
}

function overlayclose(subobj)
{
    document.getElementById(subobj).style.display="none";
}

function DisableControls(){
document.body.style.cursor = "wait";
nr = document.forms[0].elements.length;
    for(i=0;i<nr;i++)
    {
        if(document.forms[0].elements[i].tagName == "SELECT" ||
        document.forms[0].elements[i].tagName == "INPUT" ||
        document.forms[0].elements[i].tagName == "radio" || 
        document.forms[0].elements[i].type == "checkbox" || 
        document.forms[0].elements[i].type == "button"|| 
        document.forms[0].elements[i].type == "image"||
        document.forms[0].elements[i].type == "IMAGE"|| 
        document.forms[0].elements[i].type == "text")
        {
            document.forms[0].elements[i].disabled = true;
        }
    }
    
        document.getElementById('publishButtonID').disabled = true;
    
}
//onbeforeunload="DisableControls();"* call this on body