﻿// Confirm Link		function confirmLink(theLink, confirmMsg){    if (confirmMsg == '' || typeof(window.opera) != 'undefined') {        return true;    }    var is_confirmed = confirm(confirmMsg);    if (is_confirmed) {        theLink.href += '&is_js_confirmed=1';    }    return is_confirmed;} 	// AJAX LOADERfunction ajaxLoader(url,id) {  if (document.getElementById) {    var x = (window.ActiveXObject) ? new ActiveXObject("Microsoft.XMLHTTP") : new XMLHttpRequest();  }  if (x) {    x.onreadystatechange = function() {      if (x.readyState == 4 && x.status == 200) {        el = document.getElementById(id);                el.innerHTML = x.responseText;      }    }    x.open("GET", url, true);    x.send(null);  }}// Expand and Collapsefunction expandCollapse() {	for (var i=0; i<expandCollapse.arguments.length; i++) {		var element = document.getElementById(expandCollapse.arguments[i]);		element.style.display = (element.style.display == "none") ? "block" : "none";	}}function toggleBox(szDivID, iState) // 1 visible, 0 hidden{    if(document.layers)	   //NN4+    {       document.layers[szDivID].visibility = iState ? "show" : "hide";    }    else if(document.getElementById)	  //gecko(NN6) + IE 5+    {        var obj = document.getElementById(szDivID);        obj.style.visibility = iState ? "visible" : "hidden";    }    else if(document.all)	// IE 4    {        document.all[szDivID].style.visibility = iState ? "visible" : "hidden";    }}//////  Layer Positioningvar hide  = true;function showhide(obj){	var x = new getObj(obj);	hide = !hide;	x.style.visibility = (hide) ? 'hidden' : 'visible';	setLyr(obj,'testP');}function setLyr(obj,lyr,xloc,yloc){	var newX = findPosX(obj);	var newY = findPosY(obj);//	if (xloc != '') newX -= xloc;//	if (yloc != '') newy -= yloc;	var x = new getObj(lyr);	x.style.top = newY + 'px';	x.style.left = newX + 'px';}function findPosX(obj){	var curleft = 0;	if (obj.offsetParent)	{		while (obj.offsetParent)		{			curleft += obj.offsetLeft			obj = obj.offsetParent;		}	}	else if (obj.x)		curleft += obj.x;	return curleft;}function findPosY(obj){	var curtop = 0;	var printstring = '';	if (obj.offsetParent)	{		while (obj.offsetParent)		{			printstring += ' element ' + obj.tagName + ' has ' + obj.offsetTop;			curtop += obj.offsetTop			obj = obj.offsetParent;		}	}	else if (obj.y)		curtop += obj.y;	window.status = printstring;	return curtop;}function getObj(name){ if (document.getElementById) {	   this.obj = document.getElementById(name);	   this.style = document.getElementById(name).style; } else if (document.all) {	   this.obj = document.all[name];	   this.style = document.all[name].style; } else if (document.layers) {	   if (document.layers[name])	   {	   	this.obj = document.layers[name];	   	this.style = document.layers[name];	   }	   else	   {	    this.obj = document.layers.testP.layers[name];	    this.style = document.layers.testP.layers[name];	   } }}//////////////function loading_msg(lyr,msg) {var msg;msg=msg+'<img src="/admin/images/blank.gif" alt="" width="16" height="16" align="absmiddle" border="0">';document.getElementById(lyr).innerHTML=msg;}function loading_img(lyr) {var msg;msg='<img src="/admin/ajax/loading1.gif" alt="Loading..." width="64" height="52" align="absmiddle" border="0"><BR>';document.getElementById(lyr).innerHTML=msg;}function popUp(URL,width,height) {day = new Date();id = day.getTime();eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=0,width=" + width + ",height=" + height + "');");}function openPopUp() {		window.self.name = "MainWindow";	NewWindow = window.open('/modules/ImageManager/admin_default.php?image_full=<? print $my_content_rows["image_full"]; ?>','SmartSitePopup','width=450, height=400, toolbar=no, status=no, resizeable=no, scrollbars=yes');	if (!NewWindow.opener) NewWindow.opener = self;	//new_window.focus();}/// Live Edit Functions//-->