//***************************************
function rogToggleStartsHidden(eID){
	var e = document.getElementById(eID);
	if(	e.style.display		== "block"){
		e.style.display		= "none";
		e.style.visibility	= "hidden";
	}else{
		e.style.display		= "block";
		e.style.visibility	= "visible";
	}
}
function rogToggleStartsVisible(eID){
	var e = document.getElementById(eID);
	if(	e.style.display		== "none"){
		e.style.display		= "block";
		e.style.visibility	= "visible";
	}else{
		e.style.display		= "none";
		e.style.visibility	= "hidden";
	}
}
function rogToggleStartsHideMe(eID){
	var e = document.getElementById(eID);
	e.style.display		= "none";
	e.style.visibility	= "hidden";
}
function rogToggleStartsShowMe(eID){
	var e = document.getElementById(eID);
	e.style.display		= "block";
	e.style.visibility	= "visible";
}
function superDescriptorHideMe(eID){
	var e = document.getElementById(eID);
	e.style.display		= "none";
	e.style.visibility	= "hidden";
}
function superDescriptorShowMe(eID){
	var e = document.getElementById(eID);
	e.style.display		= "block";
	e.style.visibility	= "visible";
}

//***************************************
function RogeeBI400x300(url){
	rbiWin1 = window.open(url,'RogeeBI400','WIDTH=400,height=300,alwaysLowered=0,alwaysRaised=0,channelmode=0,dependent=1,directories=0,fullscreen=0,hotkeys=1,location=0,menubar=0,resizable=0,scrollbars=0,status=0,titlebar=0,toolbar=0,z-lock=0,screenX=0,screeny=0,left=0,top=0');
	rbiWin1.focus();
}

function RogeeBI640x480(url){
	rbiWin2 = window.open(url,'RogeeBI650','WIDTH=640,height=480,alwaysLowered=0,alwaysRaised=0,channelmode=0,dependent=1,directories=0,fullscreen=0,hotkeys=1,location=0,menubar=0,resizable=0,scrollbars=0,status=0,titlebar=0,toolbar=0,z-lock=0,screenX=0,screeny=0,left=0,top=0');
	rbiWin2.focus();
}

function RogeeBI800x640(url) {
	rbiWin3 = window.open(url,"RogeeBI800","WIDTH=800,height=640,alwaysLowered=0,alwaysRaised=0,channelmode=0,dependent=1,directories=0,fullscreen=0,hotkeys=1,location=0,menubar=0,resizable=1,scrollbars=1,status=1,titlebar=0,toolbar=0,z-lock=0,screenX=0,screeny=0,left=0,top=0");
	rbiWin3.focus();
}

function RogeeBI980x720(url) {
	rbiWin4 = window.open(url,"RogeeBI980","WIDTH=980,height=720,alwaysLowered=0,alwaysRaised=0,channelmode=0,dependent=1,directories=0,fullscreen=0,hotkeys=1,location=0,menubar=0,resizable=1,scrollbars=1,status=1,titlebar=0,toolbar=0,z-lock=0,screenX=0,screeny=0,left=0,top=0");
	rbiWin4.focus();
}

function RogeeBI1028x768(url) {
	rbiWin5 = window.open(url,"RogeeBI1028","WIDTH=1028,height=768,alwaysLowered=0,alwaysRaised=0,channelmode=0,dependent=1,directories=0,fullscreen=0,hotkeys=1,location=0,menubar=0,resizable=1,scrollbars=1,status=1,titlebar=0,toolbar=0,z-lock=0,screenX=0,screeny=0,left=0,top=0");
	rbiWin5.focus();
}

function ThatPayment540(url){
	tpWin1 = window.open(url,'ThatPayment540','WIDTH=540,height=640,alwaysLowered=0,alwaysRaised=0,channelmode=0,dependent=1,directories=0,fullscreen=0,hotkeys=1,location=0,menubar=0,resizable=0,scrollbars=1,status=0,titlebar=0,toolbar=0,z-lock=0,screenX=0,screeny=0,left=10,top=10');
	tpWin1.focus();
}

//***************************************
var please_wait = null;
function open_url(url, target) {
 	if ( ! document.getElementById) {
  		return false;
 	}
 	if (please_wait != null) {
  		document.getElementById(target).innerHTML = please_wait;
 	}
 	if (window.ActiveXObject) {
  		link = new ActiveXObject("Microsoft.XMLHTTP");
 	} else if (window.XMLHttpRequest) {
  		link = new XMLHttpRequest();
 	}
 	if (link == undefined) {
  		return false;
 	}
 	link.onreadystatechange = function() { response(url, target); }
 	link.open("GET", url, true);
 	link.send(null);
}
function response(url, target) {
 	if (link.readyState == 4) {
	 	document.getElementById(target).innerHTML = (link.status == 200) ? link.responseText : "<b>KoooDooo Alert:</b><br>-Content Pending.<br>-Error Number " + link.status;
	}
}
function set_loading_message(msg) {
 	please_wait = msg;
}
//***************************************
function open_url1(url,target,str1){
	if (window.XMLHttpRequest){
		xmlhttp=new XMLHttpRequest();
	}else{
		xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
	}
	xmlhttp.onreadystatechange=function(){
		if (xmlhttp.readyState==4 && xmlhttp.status==200){
			document.getElementById(target).innerHTML=xmlhttp.responseText;
		}
	}
	xmlhttp.open("GET",url+"?str1="+str1, true);
	xmlhttp.send();
}
//***************************************
function open_url2(url,target,str1,str2){
	if (window.XMLHttpRequest){
		xmlhttp=new XMLHttpRequest();
	}else{
		xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
	}
	xmlhttp.onreadystatechange=function(){
		if (xmlhttp.readyState==4 && xmlhttp.status==200){
			document.getElementById(target).innerHTML=xmlhttp.responseText;
		}
	}
	xmlhttp.open("GET",url+"?str1="+str1+"&str2="+str2, true);
	xmlhttp.send();
}
//***************************************
function open_url3(url,target,str1,str2,str3){
	if (window.XMLHttpRequest){
		xmlhttp=new XMLHttpRequest();
	}else{
		xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
	}
	xmlhttp.onreadystatechange=function(){
		if (xmlhttp.readyState==4 && xmlhttp.status==200){
			document.getElementById(target).innerHTML=xmlhttp.responseText;
		}
	}
	xmlhttp.open("GET",url+"?str1="+str1+"&str2="+str2+"&str3="+str3, true);
	xmlhttp.send();
}
//***************************************
function open_url4(url,target,str1,str2,str3,str4){
	if (window.XMLHttpRequest){
		xmlhttp=new XMLHttpRequest();
	}else{
		xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
	}
	xmlhttp.onreadystatechange=function(){
		if (xmlhttp.readyState==4 && xmlhttp.status==200){
			document.getElementById(target).innerHTML=xmlhttp.responseText;
		}
	}
	xmlhttp.open("GET",url+"?str1="+str1+"&str2="+str2+"&str3="+str3+"&str4="+str4, true);
	xmlhttp.send();
}
//***************************************
function SuperDescriptorDELETER(theImageUrl,theImageSrc,theMsgBox,theMsgLayer){
	if (!theImageUrl || !theImageSrc || !theMsgBox){
		return;
	}
	if (window.XMLHttpRequest){
		// code for IE7+, Firefox, Chrome, Opera, Safari
		xmlhttp=new XMLHttpRequest();
	}else {// code for IE6, IE5
		xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
	}
	xmlhttp.onreadystatechange=function(){
		if (xmlhttp.readyState==4 && xmlhttp.status==200){
			document.getElementById(theMsgBox).innerHTML=xmlhttp.responseText;
		}
	}
	xmlhttp.open("GET","_(c)_ROGEE_SUPER_DESCRIPTOR.php?rogAction=Delete&rogImageUrl="+theImageUrl+"&rogImageSrc="+theImageSrc+"&rogMsgBox="+theMsgBox+"&rogMsgLayer="+theMsgLayer,true);
	xmlhttp.send();
}
function ClearImageSrc(theSrc){
	if (theSrc){
		theSrc.src = '';
	}
}
//***************************************
function SuperDescriptorUPLOADER(theForm,theImageSrc,theMsgBox,theMsgLayer){

	if (!theForm || !theImageSrc || !theMsgBox){
		return;
	}
	
	if (window.XMLHttpRequest){
		// code for IE7+, Firefox, Chrome, Opera, Safari
		xmlhttp=new XMLHttpRequest();
	}else {// code for IE6, IE5
		xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
	}

	xmlhttp.onreadystatechange=function(){
		if (xmlhttp.readyState==4 && xmlhttp.status==200){
			document.getElementById(theMsgBox).innerHTML=xmlhttp.responseText;
		}
	}
	xmlhttp.open("GET","_(c)_ROGEE_SUPER_DESCRIPTOR.php?rogAction="+theForm.theAction.value+"&rogImageSrc="+theForm.theImgName.value+"&rogMsgBox="+theMsgBox+"&rogMsgLayer="+theMsgLayer+"&rogUploadFile="+theForm.theFile.value,true);
	xmlhttp.send(null);
}
//***************************************
function SuperDescriptorLAYER(f){
	rogToggleStartsHidden(f);
}
//***************************************
function rogBoxLimiter(theForm,theField,theLabel,theLimiter,theMethod){
	var cnt = theLimiter;
	var tex = theField.value;
	var len = tex.length;

	if(len > cnt){
			tex = tex.substring(0,cnt);
			theField.value = tex;
			return false;
	}

	if (theMethod == "CountBackward"){
		document.getElementById(theLabel.name).innerHTML = cnt-len;
	}else if (theMethod == "CountForward"){
		document.getElementById(theLabel.name).innerHTML = len + " of " + cnt;
	}
}

//***************************************
function TableRowChangeColor(tableRow, highLight) {
	if (highLight) {
		tableRow.style.backgroundColor = '#ffcc99';
		document.body.style.cursor = 'pointer';
	}else{
		tableRow.style.backgroundColor = '#ffffff';
		document.body.style.cursor = 'default';
	}
}
function TableRowDoNav(theUrl) {
	document.location.href = theUrl;
}

