





function getOBJForm(obj)
{
	var arrVar = new Array()
	var arrVal = new Array()	
	
	var str;
	str = obj +"";
	obj = eval(obj)
	var i;
	var msg = "";
	//alert(document.location)
	var startMSG = "<html><head><title>Form Object</title><meta HTTP-EQUIV='Content-Type' CONTENT='text/html; charset=windows-1255'><link rel='stylesheet' type='text/css' href='/Admin/App/Core/Common/CSS_Global.css' title=''></head><body class=DLGAdmin><div align='center'>"
	
		msg = "<table cellspacing='0' cellpadding='0' border='1' style='padding-top:1;padding-bottom:2;padding-right:10;padding-left:10;' bordercolor='#000000' class=BodyAdmin>" +
						"<tr>"+
					    	"<td colspan='3' align='center'><strong><u>"+document.location+"<br>(FORM)</u></strong></td>"+
						"</tr>"
	
	
	var endMSG   = 	"</div></body></html>"
	
	
	var j=1
	for(i in obj)
			{
			var tmp = "";
			try{
				if(eval("obj." + i )=="[object]" &&  (eval("obj." + i +".tagName") =="INPUT"  || eval("obj." + i +".tagName") ==  "TEXTAREA")  &&   ""+i  !="firstChild")
									{
									arrVar[j-1] = ""+i
									
									if(eval("obj." + i +".value")=="")
										 	arrVal[j-1] = "&nbsp;"
										 else
											arrVal[j-1] = ""+eval("obj." + i +".value")
									j++;
									
									//tmp += "<tr><td> " + i + " </td>" ;
									//tmp += "<td> &nbsp;&nbsp;&nbsp;" + eval("obj." + i +".value ") + "</td></tr>" 
									}
							
				}
			catch(e){
					 // tmp = "<tr><td> &nbsp;&nbsp;</td><td> &nbsp;&nbsp;</td></tr>" 
					}
			//msg += tmp ;
			}
	
	for(i=0;i<arrVar.length-1 ; i++)
		for(j=i+1;j<arrVal.length ; j++)
			{
			if(arrVar[j]<arrVar[i])
				{
				 tmp = ""+arrVar[j]
				 arrVar[j] = "" + arrVar[i]
				 arrVar[i] = "" + tmp
				 
				 tmp = ""+arrVal[j]
				 arrVal[j] = "" + arrVal[i]
				 arrVal[i] = "" + tmp
				}
			}	
	
	
	
	
for(i=0;i<=arrVar.length-1 ; i++)
		  	{
				msg +="<tr><td>" + (i+1) +"</td>"
				msg +="<td><strong>"+arrVar[i]+"</strong></td>"
				msg +="<td>"+arrVal[i]+"</td></tr>"
	  }	
	
	
	msg += "<tr><td colspan='3'>End.</td></tr></table>"
	var win = window.open("about:blank","","")
	//msg = "<br><strong><u>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"+str+"</u></strong><br>" + msg
	win.document.write(startMSG+ msg + endMSG);
	return;


}

function getOBJ(obj,iTitle)
{
	var str;
	str = obj +"";
	obj = eval(obj)
	var i;
	var msg = "";
	msg = "<table cellspacing='0' cellpadding='0' border='1px' style='border: solid black 1px;padding-top:1;padding-bottom:2;padding-right:10;padding-left:10;' bordercolor='#000000' class=BodyAdmin>";
		
	for(i in obj)
			{

			msg += "<tr><td> " + i + " </td>" ;
			try{msg += "<td> &nbsp;&nbsp;&nbsp;" + eval("obj." + i ) + "</td>" }
			catch(e){msg += "<td> &nbsp;&nbsp;</td>" }
			msg += "</tr>" ;
			}

	msg += "</table>"
	var win = window.open("about:blank","","")
	msg = "<br><strong><u>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"+str+"</u></strong><br>" + msg
	win.document.write( msg);
	return;
}


function getOBJHTML(obj)
{
	var str;
	str = obj +"";
	obj = eval(obj)
	var i;
	var msg = "";
	msg = "<table>";
		
	for(i in obj)
			{

			msg += "<tr><td> " + i + " </td>" ;
			try{msg += "<td> &nbsp;&nbsp;&nbsp;" + eval("obj." + i ) + "</td>" }
			catch(e){msg += "<td> &nbsp;&nbsp;</td>" }
			msg += "</tr>" ;
			}

	msg += "</table>"
	//var win = window.open("about:blank","","")
	msg = "<br><strong><u>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"+str+"</u></strong><br>" + msg
	// win.document.write( msg);
	return msg;
}




function isFunction(strFunction)
{
    var func = "" + strFunction;
    try{
        func = eval(func);
        return true;
        }
    catch(e){}      
    return false;  
}



function isEnterKey(e)
{
    //alert((e.keyCode && e.keyCode == 13))
    return ((e.which && e.which == 13) || (e.keyCode && e.keyCode == 13));
}

/*
function GetFunction(strFunction)
{
   var func = "" + strFunction;
   try{ (typeof( func) == "function" )? return eval(func) : return null; }
   catch(e){}
   return null;
}
*/


































/*******************************************************************************
FILE NAME        :browser.js
DESCRIPTION      :sniffs browser
API DEPENDENCIES :none
********************************************************************************
____________________________ API DOCUMENTATION BEGIN ___________________________
````````````````````````````````````````````````````````````````````````````````

````````````````````````````````````````````````````````````````````````````````
_____________________________ API DOCUMENTATION END ____________________________
*******************************************************************************/

//CLASS CONSTRUCTOR-- builds browser information object-- jsv 1.2
function _browserInfo()
{
 this.ie = false;
 
 var navAppName = navigator.appName.toLowerCase();
 var navUserAgent = navigator.userAgent.toLowerCase();
 
 

 if((navAppName.indexOf("microsoft")>=0) && !(navUserAgent.indexOf("opera")>=0)) //if IE
 {
  
  this.ie = true;
	var start_pos = navUserAgent.indexOf("msie") + 4;
	this.majorVersion = parseInt(navUserAgent.substring(start_pos));
	this.majorMinorVersion = parseFloat(navUserAgent.substring(start_pos));
	
  if(this.majorVersion == 6) this.ie6 = true; //using internet explorer 6
	else if(this.majorVersion == 5) this.ie5 = true; //using internet explorer 5
  else if(this.majorVersion == 4) this.ie4 = true; //using internet explorer 4 
	else if(this.majorVersion == 3) this.ie3 = true; //using internet explorer 3
 }
 else if((navAppName.indexOf("netscape")>=0) && !(navUserAgent.indexOf("opera")>=0) && !(navUserAgent.indexOf("safari")>=0)) //if Netscape 
 {
	if(parseInt(navigator.appVersion) == 5) //Netscape 6 or 7
	{
   if((navAppName.indexOf("netscape")>=0) && !(navUserAgent.indexOf("aol")>=0)) //if Netscape standalone
	 {
	  var start_pos = navUserAgent.indexOf("netscape") + 8; //sets string position
	
	  if(navUserAgent.charAt(start_pos) == "/") //if string Netscape/[n]
	  { 
	   this.majorVersion = parseInt(navUserAgent.substring(start_pos+1));
	   this.majorMinorVersion = parseFloat(navUserAgent.substring(start_pos+1));
	  }
	  else if(navUserAgent.charAt(start_pos + 1) == "/") //if string Netscape[n]/[n]
	  { 
	   this.majorVersion = parseInt(navUserAgent.substring(start_pos+2));
	   this.majorMinorVersion = parseFloat(navUserAgent.substring(start_pos+2));
		}
	  else //if string Netscape[n]
	  { 
	   this.majorVersion = parseInt(navUserAgent.substring(start_pos)); 
	   this.majorMinorVersion = parseFloat(navUserAgent.substring(start_pos)); 
	  }
	 }
	 else if((navAppName.indexOf("netscape")>=0) && (navUserAgent.indexOf("aol")>=0)) //if Netscape AOL
	 {
	  var start_pos = navUserAgent.indexOf("aol") + 3; //sets string position
	
	  if(navUserAgent.charAt(start_pos) == "/") //if string AOL/[n]
	  { 
	   this.majorVersion = parseInt(navUserAgent.substring(start_pos+1));
	   this.majorMinorVersion = parseFloat(navUserAgent.substring(start_pos+1));
	  }
	 }
  }
  else if(parseInt(navigator.appVersion) == 4 || parseInt(navigator.appVersion) == 3) //Netscape 3 or 4
  {
	 this.majorVersion = parseInt(navigator.appVersion); 
	 this.majorMinorVersion = parseFloat(navigator.appVersion); 	 
  }
	
	this.ns = true;
	
	if(this.majorVersion == 7) this.ns7 = true; //using Netscape 7
	else if(this.majorVersion == 6) this.ns6 = true; //using Netscape 6
  else if(this.majorVersion == 4) this.ns4 = true; //using Netscape 4
  else if(this.majorVersion == 3) this.ns3 = true; //using Netscape 3
 }
 else if((navUserAgent.indexOf("safari")>=0)) //if Safari
 {
  this.safari = true;
	var start_pos = navUserAgent.indexOf("safari/") + 7;
	this.majorVersion = parseInt(navUserAgent.substring(start_pos));
	this.majorMinorVersion = parseFloat(navUserAgent.substring(start_pos));
	
  if(this.majorVersion == 85) this.safari1 = true; //using safari 1
 }
 else if(navUserAgent.indexOf("opera")>=0) //if Opera
 {
  this.opera = true;
	var start_pos = navUserAgent.indexOf("opera") + 6;
	this.majorVersion = parseInt(navUserAgent.substring(start_pos));
	this.majorMinorVersion = parseFloat(navUserAgent.substring(start_pos));
	
  if(this.opera && this.majorVersion == 5) this.opera5 = true; //using Opera 5
	else if(this.opera && this.majorVersion == 7) this.opera7 = true; //using Opera 7
 }

 //identify platform
 var browserPlatform = navigator.platform.toLowerCase();
 if(browserPlatform.indexOf("win")>=0) this.isWin = true;
 else if(browserPlatform.indexOf("mac")>=0) this.isMac = true;
 else this.isWin = true; //default to win platform if platform is not identified
}

//-- global variables begin ----------------------------------------------------
gBrowser = new _browserInfo();
//-- global variables end ------------------------------------------------------


















function regExp_escape(old_str) {
            
        var str = new String("" + old_str);
        var badChars = [/\//g , /\\/g , /\|/g , /\./g , /\(/g , /\)/g , /\$/g , /\[/g , /\^/g , /\*/g , /\\'/g , /\"/g , /\+/g , /\?/g];
        var goodChars = ['\/', '\\\\' , '\\|' , '\\.' , '\\(' , '\\)' , '\\$' , '\\[' , '\\^' , '\\*' , '\\\'' , '\\"' , '\\+' , '\\?'];
        for (var i=0; i<badChars.length; ++i) str = str.replace(badChars[i], goodChars[i]);
        //var RE = new RegExp(str, 'g');
        return str; //.replace(RE, NewStr);
    }






function FixRestrictChars(str)
{
    str = str.replace(">","");
    str = str.replace("<","");
    
    return str;
}






//
// functions that obtain the width of an HTML element.
//
function GetOBJWidth(obj)
{
	var width = obj.offsetWidth;
	if (width > 0 || !cmIsTRNode (obj))
		return width;
	if (!obj.firstChild)
		return 0;
	// use TABLE's length can cause an extra pixel gap
	//return obj.parentNode.parentNode.offsetWidth;

	// use the left and right child instead
	return obj.lastChild.offsetLeft - obj.firstChild.offsetLeft + GetOBJWidth (obj.lastChild);
}

//
// functions that obtain the height of an HTML element.
//
function GetOBJHeight (obj)
{
	var height = obj.offsetHeight;
	if (height > 0 || !cmIsTRNode (obj))
		return height;
	if (!obj.firstChild)
		return 0;
	// use the first child's height
	return obj.firstChild.offsetHeight;
}

//
// functions that obtain the coordinates of an HTML element
//
function GetOBJX (obj)
{
	var x = 0;

	do
	{
		x += obj.offsetLeft;
		obj = obj.offsetParent;
	}
	while (obj);
	return x;
}

function GetOBJXAt (obj, elm)
{
	var x = 0;

	//getOBJ(obj)
	while (obj && obj != elm)
	{
		x += obj.offsetLeft;
		obj = obj.offsetParent;
	}
	if (obj == elm)
		return x;
	return x - GetOBJX (elm);
}

function GetOBJY (obj)
{
	var y = 0;
	do
	{
		y += obj.offsetTop;
		obj = obj.offsetParent;
	}
	while (obj);
	return y;
}

function cmIsTRNode (obj)
{
	var tagName = obj.tagName;
	return tagName == "TR" || tagName == "tr" || tagName == "Tr" || tagName == "tR";
}

//
// get the Y position of the object.  In case of TR element though,
// we attempt to adjust the value.
//
function GetOBJYAt (obj, elm)
{
	var y = 0;

	if (!obj.offsetHeight && cmIsTRNode (obj))
	{
		var firstTR = obj.parentNode.firstChild;
		obj = obj.firstChild;
		y -= firstTR.firstChild.offsetTop;
	}

	while (obj && obj != elm)
	{
		y += obj.offsetTop;
		obj = obj.offsetParent;
	}

	if (obj == elm)
		return y;
	return y - GetOBJY (elm);
}













//------------------------------------------------------------------------------
// BYPASS MANUALLY ACTIVATING ACTIVEX CONTROLS IN IE BEGIN
//------------------------------------------------------------------------------

//FUNCTION-- writes ActiveXControl to avoid manually activating ActiveX controls by clicking on the control in IE
function addActiveXControl(argSwfPathLink, argSwfPath,iWidth,iHeight) {
 var axcStr = "";
 
 axcStr += '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="' + iWidth + '" height="' + iHeight + '" id="optin_player" align="middle">';
 axcStr += '<param name="allowScriptAccess" value="sameDomain" />';
 axcStr += '<param name="movie" value="'+argSwfPathLink+'" />';
 axcStr += '<param name="quality" value="high" />';
 axcStr += '<param name="bgcolor" value="#ffffff" />';
 axcStr += '<param name="wmode" value="transparent" />';
 axcStr += '<embed src="'+argSwfPath+'" quality="high" wmode="transparent" bgcolor="#ffffff" width="' + iWidth + '" height="' + iHeight + '" name="optin_player" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />';
 axcStr += '</object>';

 document.write(axcStr);
}

//------------------------------------------------------------------------------
// BYPASS MANUALLY ACTIVATING ACTIVEX CONTROLS IN IE END
//------------------------------------------------------------------------------

