function trim(s) 
{
  while ((s.substring(0,1) == ' ') || (s.substring(0,1) == '\n') || (s.substring(0,1) == '\r'))
	s = s.substring(1,s.length);

  while ((s.substring(s.length-1,s.length) == ' ') || (s.substring(s.length-1,s.length) == '\n') || (s.substring(s.length-1,s.length) == '\r'))
	s = s.substring(0,s.length-1);

  return s;
}

function CheckEmail(emailStr)
{
	emailStr=trim(emailStr);
	var emailPat=/^(.+)@(.+)$/
	var specialChars="\\(\\)<>@,;:\\\\\\\"\\.\\[\\]"
	var validChars="\[^\\s" + specialChars + "\]"
	var quotedUser="(\"[^\"]*\")"
	var ipDomainPat=/^\[(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})\]$/
	var atom=validChars + '+'
	var word="(" + atom + "|" + quotedUser + ")"
	var userPat=new RegExp("^" + word + "(\\." + word + ")*$")
	var domainPat=new RegExp("^" + atom + "(\\." + atom +")*$")
	var matchArray=emailStr.match(emailPat)

	if (matchArray==null)
	{
		alert("Email address seems incorrect (check @ and .'s)")
		return false
	}

	var user=matchArray[1]
	var domain=matchArray[2]

	if (user.match(userPat)==null)
	{
		// user is not valid
		alert("The email doesn't seem to be valid.")
		return false
	}

	var IPArray=domain.match(ipDomainPat)

	if (IPArray!=null) 
	{
		for (var i=1;i<=4;i++)
		{
			if (IPArray[i]>255) 
			{	
				alert("Destination IP address is invalid!")
				return false
			}
		}		
	}
	var domainArray=domain.match(domainPat)
	if (domainArray==null)
	{
		alert("The domain name doesn't seem to be valid.")
		return false
	}

	var atomPat=new RegExp(atom,"g")
	var domArr=domain.match(atomPat)
	var len=domArr.length
		
	if (domArr[domArr.length-1].length<2 || domArr[domArr.length-1].length>3) 
	{
		alert("The address must end in a three-letter domain, or two letter country.")
		return false
	}

	if (len<2)
	{
		var errStr="This address is missing a hostname!"
		alert(errStr)
		return false
	}
	return true
}

function echeck(str) {

	var at="@"
	var dot="."
	var lat=str.indexOf(at)
	var lstr=str.length
	var ldot=str.indexOf(dot)
	
	if (str.indexOf(at)==-1){
	   alert("Invalid E-mail ID")
	   return false
	}

	if (str.indexOf(at)==-1 || str.indexOf(at)==0 || str.indexOf(at)==lstr){
	   alert("Invalid E-mail ID")
	   return false
	}

	if (str.indexOf(dot)==-1 || str.indexOf(dot)==0 || str.indexOf(dot)==lstr-1){
		alert("Invalid E-mail ID")
		return false
	}

	 if (str.indexOf(at,(lat+1))!=-1){
		alert("Invalid E-mail ID")
		return false
	 }

	 if (str.substring(lat-1,lat)==dot || str.substring(lat+1,lat+2)==dot){
		alert("Invalid E-mail ID")
		return false
	 }

	 if (str.indexOf(dot,(lat+2))==-1){
		alert("Invalid E-mail ID")
		return false
	 }
	
	 if (str.indexOf(" ")!=-1){
		alert("Invalid E-mail ID")
		return false
	 }

	 return true					
}

var BrowserDetect = {
	init: function () {
		this.browser = this.searchString(this.dataBrowser) || "An unknown browser";
		this.version = this.searchVersion(navigator.userAgent)
			|| this.searchVersion(navigator.appVersion)
			|| "an unknown version";
		this.OS = this.searchString(this.dataOS) || "an unknown OS";
	},
	searchString: function (data) {
		for (var i=0;i<data.length;i++)	{
			var dataString = data[i].string;
			var dataProp = data[i].prop;
			this.versionSearchString = data[i].versionSearch || data[i].identity;
			if (dataString) {
				if (dataString.indexOf(data[i].subString) != -1)
					return data[i].identity;
			}
			else if (dataProp)
				return data[i].identity;
		}
	},
	searchVersion: function (dataString) {
		var index = dataString.indexOf(this.versionSearchString);
		if (index == -1) return;
		return parseFloat(dataString.substring(index+this.versionSearchString.length+1));
	},
	dataBrowser: [
		{ 	string: navigator.userAgent,
			subString: "OmniWeb",
			versionSearch: "OmniWeb/",
			identity: "OmniWeb"
		},
		{
			string: navigator.vendor,
			subString: "Apple",
			identity: "Safari"
		},
		{
			prop: window.opera,
			identity: "Opera"
		},
		{
			string: navigator.userAgent,
			subString: "Firefox",
			identity: "Firefox"
		},
		{		// for newer Netscapes (6+)
			string: navigator.userAgent,
			subString: "Netscape",
			identity: "Netscape"
		},
		{
			string: navigator.userAgent,
			subString: "MSIE",
			identity: "Explorer",
			versionSearch: "MSIE"
		},
		{
			string: navigator.userAgent,
			subString: "Gecko",
			identity: "Mozilla",
			versionSearch: "rv"
		},
		{ 		// for older Netscapes (4-)
			string: navigator.userAgent,
			subString: "Mozilla",
			identity: "Netscape",
			versionSearch: "Mozilla"
		}
	],
	dataOS : [
		{
			string: navigator.platform,
			subString: "Win",
			identity: "Windows"
		},
		{
			string: navigator.platform,
			subString: "Mac",
			identity: "Mac"
		},
		{
			string: navigator.platform,
			subString: "Linux",
			identity: "Linux"
		}
	]

};
		BrowserDetect.init();
var setLocation;
setLocation=0;

function DvLayerOpen4PopUP(H, W, Id)
{
	if(Id=="DvContentPopup1")
	{
		if(setLocation==0)
		{
			searchText="I'm looking for a good "+document.srch.category.value+" near "+ document.srch.locationreview.value+"\n\n";
			searchText+="I'm using MojoPages.com to help me collect and organize business reviews from my friends. It's really easy and better than calling or emailing each other to get recommendations. If you know a good "+document.srch.category.value+" please click on the link below to review one for me.\n\n";
			searchText+="Thanks for your help.\n"
			document.getElementById("userMessage").value=searchText;
		}
		setLocation=1;
	}
	var DvLayerId = document.getElementById("DvOpaqueLayer"); 			// Var for Main full Opaque Layer
	var DvMessageId = document.getElementById(Id); // Var for Main content div popup Layer
	var ScrollHeight = document.body.scrollHeight; 														// Value for scroll height of the page
	var ScrollWidth = document.body.scrollWidth; 																// Value for scroll width of the page
	var ClientHeight = document.documentElement.clientHeight; 			// Value for browser height of the page
	var ClietnWidth = document.documentElement.clientWidth; 					// Value for Browser width of the page
	var OffsetHeight = document.documentElement.offsetHeight; 			// Value for scroll height for Safari of the page
	var OffsetWidth = document.documentElement.offsetWidth; 					// Value for height height for Safari of the page
		
	DvLayerId.style.display="";
	
	//alert("Scroll Height : "+ScrollHeight+ "\nClientHeight : "+ClientHeight+ "\nOffsetHeight : " +OffsetHeight);
	
	 if(ScrollHeight<ClientHeight)
		{
		 if(BrowserDetect.browser=="Explorer" || BrowserDetect.browser=="Firefox" || BrowserDetect.browser=="Netscape")
			DvLayerId.style.height=ClientHeight+30+"px";
			else
			DvLayerId.style.height=ScrollHeight+30+"px";
		}
		else
		DvLayerId.style.height=ScrollHeight+100+"px";
	
	PosLeft = W/2;
	scroll(35,35);
	DvLayerId.style.width=ClietnWidth+"px";
	DvLayerId.style.top=0+"px";
	DvLayerId.style.left=0+"px";
	DvMessageId.style.left=240+"px";
	DvMessageId.style.top=100+"px";
	DvMessageId.style.width=500+"px";
	DvMessageId.style.display="";
}

function showContact()
{	
	if(checkMessageForm())
	{
		document.getElementById("DvContentPopup1").style.display='none';
		DvLayerOpen4PopUP('200','200', 'DvContentPopup2');	
		
		setLoginName()
	}
}

function setLoginName()
{	
	frm=document.srch;
	frm.loginName.value=frm.fromEmail.value
}

function checkMessageForm()
{
	frm=document.srch;
	if(document.srch.fromName.value=='' || document.srch.fromName.value=='Your Name')
	{
		alert("Please Enter Proper Sender Name");
		document.srch.fromName.focus();
		return false;
	}
	if(document.srch.fromEmail.value=='')
	{
		alert("Please enter your email address");
		document.srch.fromEmail.focus();
		return false;
	}
	if(!echeck(document.srch.fromEmail.value))
	{
		document.srch.fromEmail.focus();
		return false;
	}
	return true;
}

function setEmailClient(val)
{
	document.getElementById("mailClient").value=val;
	document.getElementById("serverName").innerHTML=val;
//	document.getElementById("buttonPress1").innerHTML=val;
	document.getElementById("buttonPress2").innerHTML=val;
	
	if(checkMessageForm())
	{
		document.getElementById("DvContentPopup2").style.display='none';
		DvLayerOpen4PopUP('200','200', 'userLogin');	
		
		setLoginName()
	}
}

function setEmailServer()
{
	if(document.srch.loginName.value=='')
	{
		alert("Enter username")
		document.srch.loginName.focus();
		return false;
	}
	if(document.srch.pass.value=='')
	{
		alert("Enter password")
		return false;
	}
	return true;
}

function getHTTPObject() {
  var xmlhttp;
  /*@cc_on
  @if (@_jscript_version >= 5)
    try {
      xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
    } catch (e) {
      try {
        xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
      } catch (E) {
        xmlhttp = false;
      }
    }
  @else
  xmlhttp = false;
  @end @*/
  if (!xmlhttp && typeof XMLHttpRequest != 'undefined') {
    try {
      xmlhttp = new XMLHttpRequest();
    } catch (e) {
      xmlhttp = false;
    }
  }
  return xmlhttp;
}


var http = getHTTPObject(); // We create the HTTP Object

var tot;
function getContactDetail(url)
{
	if(document.getElementById('frdRow')){
		document.getElementById('frdRow').innerHTML="";
	}	

	if(setEmailServer())
	{
		strLogin=document.srch.loginName.value;

		if(strLogin.search("@")== -1)
			username=document.srch.loginName.value+"@"+document.getElementById("mailClient").value+".com";
		else
			username=document.srch.loginName.value;
	
		
		document.srch.finalFromEmail.value=username;
		password=document.srch.pass.value;

		postVar = "name="+username+"&pass="+password;
		http.open("POST", url , true);
		
		document.getElementById('DvContentPopup2').style.display='none';
		document.getElementById('userLogin').style.display='none';
		DvLayerOpen4PopUP('200','200', 'DvContentPopup3');
		document.getElementById('searchData').innerHTML='&nbsp;&nbsp;please wait....'

		document.srch.loginName.value='';
		document.srch.pass.value='';
		
		http.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); 
		http.onreadystatechange = handlegetContactDetail;
		http.send(postVar);
	}
}

var contactString;
function handlegetContactDetail()
{
	if (http.readyState == 4)
	{
		results = http.responseText.split("<my_message_data>");
//		alert(results);
		if(results[1]== "-1")
		{
			document.getElementById('searchData').innerHTML="<div style='font-family: Arial, Helvetica, sans-serif;color:#FF0000;' align='center'><br>Error Occur <br> You have entered an invalid email or password.<br><br> please hit the back button and try again.</div>";
			return false;
		}
		else if(results[1]== "-2")
		{
			document.getElementById('searchData').innerHTML="<div style='font-family: Arial, Helvetica, sans-serif;color:#FF0000;' align='center'><br>Error Occur <br> You have no contacts in that email account.<br><br> please hit the back button and try again.</div>";
			return false;
		}
		else
		{
			contactString=results[1].split(",");
		}
		showAll()
	}
}


function showAll()
{
	contactLength=contactString.length;
	data='';
	tot = contactLength;
	for(i=0;i<contactLength;i++)
	{
		if(i % 2 ==0)
			data+='<div class="Gry">';
		else
			data+='<div class="Wht">';
			
		contactArray=contactString[i].split("::");

		eml=contactArray[1];
		nme=contactArray[0];
		data+='<div class="Col1"><input checked id="firstname'+i+'" type="checkbox" name="userInfo[]" value="'+nme+'||'+eml+'" /></div><div class="Col2">'+nme+'</div><div class="Col3">'+eml+'</div></div>';
	}		

	if(data=='')
		data='<div align="center" style="width:300px" class="Col1">Contact not found !!</div>'
	document.getElementById('searchData').innerHTML=data;
}


function checkAll()
{
	for(i=0;i<tot;i++)
	{	
		ids='firstname'+i;
		document.getElementById(ids).checked=true;
	}
}

function unCheckAll()
{
	for(i=0;i<tot;i++)
	{
		ids='firstname'+i;
		document.getElementById(ids).checked=false;
	}
}

function checkAllAdd()
{
	for(i=0;i<tot_friend;i++)
	{	
		ids='firstname'+i;
		if(document.getElementById(ids))
			document.getElementById(ids).checked=true;
	}
}

function unCheckAllAdd()
{
	for(i=0;i<tot_friend;i++)
	{
		ids='firstname'+i;
		if(document.getElementById(ids))
			document.getElementById(ids).checked=false;
	}
}
var postVar;
function checkfrmRecipient()
{	

	var k = 0;

	for(i=0;i<tot;i++)
	{
		ids='firstname'+i;
		
		if(document.getElementById(ids).checked==true)
		{
			k=1;
			break;
		}
	}

	if(k==0)
	{
		alert("select atlease one friend!!");
		return false;
	}
	else
	{
		document.srch.finalFromName.value=document.srch.fromName.value;
		document.getElementById('DvContentPopup3').style.display='none';
		DvLayerOpen4PopUP('200','200', 'loadingImage');

		postVar = "mode=" + document.srch.mode.value + "&finalFromName=" + document.srch.finalFromName.value + "&finalFromEmail=" + document.srch.finalFromEmail.value;
		postVar = postVar + "&category=" + document.srch.category.value + "&locationreview=" + document.srch.locationreview.value + "&userMessage=" + document.srch.userMessage.value;
	
		for(i=0;i<tot;i++)
		{	
			id='firstname'+i;
			if(document.getElementById(id).checked == true){
				postVar = postVar + "&userInfo[]=" + document.getElementById(id).value;
			}
		}

//		url = "{/literal}{$HTTP_LOCATION}?mysession={encode paramstring='reviews_requestReview'}{literal}";
		url = "?mysession=cmV2aWV3c19yZXF1ZXN0UmV2aWV3";
		http.open("POST", url , true);
		http.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); 
		http.onreadystatechange = handlecheckfrmRecipient;
		http.send(postVar);
	}
}

function handlecheckfrmRecipient()
{
	tmpRes=http.responseText;

	result=tmpRes.split("<my_message_data>");
	if(result[1] == "1")
	{
		document.getElementById('loadingImage').style.display='none';	
		window.location.href="?mysession=ZnJpZW5kcmV2aWV3X2ZyaWVuZFJ2d1JlcXVlc3QmcmVxdWVzdFJldmlldz0x";
	}
	else if(result[1] == "2")
	{
		imgUrl=result[2];
		document.getElementById('loadingImage').style.display='none';
		DvLayerOpen4PopUP('200','200', 'gmpImage');
		document.getElementById('message_ver_code').value='';
		document.getElementById('message_ver_code').focus();
		document.getElementById("varifyImage").innerHTML='<img src="'+imgUrl+'" alt="Verification" title="Verification">';
	}
/*	if (http.readyState == 4){
		if(http.responseText == "1"){
			document.getElementById('loadingImage').style.display='none';	
			window.location.href="?mysession=ZnJpZW5kcmV2aWV3X2ZyaWVuZFJ2d1JlcXVlc3QmcmVxdWVzdFJldmlldz0x";
		}
	}	*/
}

function showTrustedList(url)
{
	document.getElementById("userLogin").style.display='none';
	document.getElementById("outLookData").style.display='none';
	document.getElementById('searchData').innerHTML="";
	
	document.getElementById('DvContentPopup2').style.display='none';
	DvLayerOpen4PopUP('200','200', 'DvContentPopup4');
	
	document.srch.addFrdName.value=document.srch.fromName.value
	document.srch.addFrdEmail.value=document.srch.fromEmail.value

	//document.getElementById('frdRow').innerHTML='&nbsp;&nbsp;please wait....'
	//http.open("POST", url , true);
	//http.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); 
	//http.onreadystatechange = handleshowTrustedList;
	//http.send(null);
}

var tot_friend;
tot_friend=0;
var fnameArray;
function handleshowTrustedList()
{
	if (http.readyState == 4)
	{
		results = http.responseText.split("<my_message_data>");
		trustedData=results[1].split(",");
		
		if(trustedData != '')
		{
			tot_friend=trustedData.length;
			data='';
			for(i=0;i<tot_friend;i++)
			{
				trustedArr=trustedData[i].split("::");
				emlVal=trustedArr[1];
				nmeVal=trustedArr[0];
				
				chkBoxValue=nmeVal+"||"+emlVal;
		
				if(i%2==0)
				{
					data+='<div class="Wht"><div class="Col1"><input checked id="firstname'+(i)+'"  name="userInfo[]" type="checkbox" value="'+chkBoxValue+'"></div><div class="Col2">'+nmeVal+'</div><div class="Col3">'+emlVal+'</div></div>';
				}
				else
				{
					data+='<div class="Gry"><div class="Col1"><input checked id="firstname'+(i)+'" name="userInfo[]" type="checkbox" value="'+chkBoxValue+'"></div><div class="Col2">'+nmeVal+'</div><div class="Col3">'+emlVal+'</div></div>';
				}
			}
			document.getElementById('frdRow').innerHTML=data;
		}
		else
		{
			tot_friend=0;
			document.getElementById('frdRow').innerHTML='';
		}
	}
}

function addnewfriends()
{
	tot_friend++;
	fnameArray = new Array(tot_friend);
	
	var emlVal=document.getElementById("userEmail").value;
	var nmeVal=document.getElementById("userName").value;
    
    if(document.getElementById("userEmail").value=='' || document.getElementById("userName").value=='')
	{
		alert("Please Enter Friend's Name and Email");
		return false;
	}

	if(echeck(document.getElementById("userEmail").value)==true)
	{
		chkBoxValue=nmeVal+"||"+emlVal;


		if((tot_friend-1)%2==0)
		{
			document.getElementById("frdRow").innerHTML+='<div class="Wht"><div class="Col1"><input checked id="firstname'+(tot_friend-1)+'"  name="userInfo[]" type="checkbox" value="'+chkBoxValue+'"></div><div class="Col2">'+nmeVal+'</div><div class="Col3">'+emlVal+'</div></div>';
		}
		else
		{
			document.getElementById("frdRow").innerHTML+='<div class="Gry"><div class="Col1"><input checked id="firstname'+(tot_friend-1)+'" name="userInfo[]" type="checkbox" value="'+chkBoxValue+'"></div><div class="Col2">'+nmeVal+'</div><div class="Col3">'+emlVal+'</div></div>';
		}
	 }
} 

function checkAddData()
{
	if(document.srch.addFrdName.value=='Your Name')
	{
		alert("Please Enter Proper Sender Name");
		return false;
	}

	if(document.srch.addFrdEmail.value=='')
	{	
		alert("Please Enter Proper Sender Email");
		return false;
	}
	if(echeck(document.srch.addFrdEmail.value)==false)
	{
		document.srch.addFrdEmail.focus();
		return false;
	}

	flag=0;
	for(i=0;i<(tot_friend);i++)
	{
		name="firstname"+i;
		if(document.getElementById(name))
		{
			if(document.getElementById(name).checked==true)
				flag=1;
		}
	}
	frm=document.srch;
	
	if(flag==1)
	{	
		frm.finalFromName.value=frm.addFrdName.value;
		frm.finalFromEmail.value=frm.addFrdEmail.value;
		//alert(frm.finalFromName.value);
		//alert(frm.addFrdEmail.value);
		//return false;
		document.srch.submit();
	}
	else
	{
		alert("Select atleast one friend!!")
		return false;
	}
}

function setFieldType()
{	
	document.getElementById('textPass').style.display='none';
	document.getElementById('passwordPass').style.display='';
	document.getElementById('pass').focus();
}

function clearValue(ele)
{	
	document.getElementById(ele).value='';
}

function onABCommComplete(outLookData)
{
	addOutLookData(outLookData);
  // OPTIONAL: do something here when the new data gets populated in the text area
  // data is an array of selected name/email arrays, i.e. [[name1, email1], [name2, email2], ...]
}

function showOutLookData()
{
	document.getElementById("DvContentPopup2").style.display='none';
	DvLayerOpen4PopUP('200','200', 'outLookData');

//	showPlaxoABChooser('recipient_list','/{/literal}{$plaxoFolder}{literal}out/plaxo/plaxo_cb.html'); //old 

	showPlaxoABChooser('recipient_list','/out/plaxo/plaxo_cb.html'); // for dev server
//	showPlaxoABChooser('recipient_list','/mojopages/out/plaxo/plaxo_cb.html'); // for local server 

	document.srch.outLookfromName.value=document.srch.fromName.value;
	document.srch.outLookfromEmail.value=document.srch.fromEmail.value;
}

var tot_outLook;
function addOutLookData(outLookData)
{
	document.getElementById('searchData').innerHTML="";

	tot_outLook=outLookData.length;
	data = '';
	for(i=0;i<tot_outLook;i++)
	{
		if(i % 2 ==0)
			data+='<div class="Gry">';
		else
			data+='<div class="Wht">';

		nme=outLookData[i][0];
		eml=outLookData[i][1];
		
		nme=nme.substr(0,15);

		aCharExists = 0;
		for (var k=0; k<nme.length; k++) {
			if (nme.charAt(k) == "@") {
				aCharExists = 1;
				break;
			}
		}
		
		if(aCharExists == 1)
			data+='<div class="Col1"><input checked id="firstname'+i+'" type="checkbox" name="userInfo[]" value="'+nme.substring(0,nme.indexOf('@'))+'||'+eml+'" /></div><div class="Col2">'+nme.substring(0,nme.indexOf('@'))+'</div><div class="Col3">'+eml+'</div></div>';
		else	
			data+='<div class="Col1"><input checked id="firstname'+i+'" type="checkbox" name="userInfo[]" value="'+nme+'||'+eml+'" /></div><div class="Col2">'+nme+'</div><div class="Col3">'+eml+'</div></div>';
	}		

	if(data=='')
		data='<div align="center" style="width:300px" class="Col1">Contact not found !!</div>'
	document.getElementById('outLookHtml').innerHTML=data;

}

function checkAllOutLook()
{
	for(i=0;i<tot_outLook;i++)
	{	
		ids='firstname'+i;
		document.getElementById(ids).checked=true;
	}
}

function unCheckAllOutLook()
{
	for(i=0;i<tot_outLook;i++)
	{
		ids='firstname'+i;
		document.getElementById(ids).checked=false;
	}
}

function goBackToFirstWindow()
{	
	document.getElementById("DvContentPopup2").style.display='none';
	DvLayerOpen4PopUP('200','200', 'DvContentPopup1');	
}

function goBackToSecondWindow()
{	
	document.getElementById("DvContentPopup3").style.display='none';
	DvLayerOpen4PopUP('200','200', 'DvContentPopup2');	
}

function goBackToSecondWindow1()
{
	document.getElementById("DvContentPopup4").style.display='none';
	DvLayerOpen4PopUP('200','200', 'DvContentPopup2');	
}

function goBackToSecondWindow2()
{	
	document.getElementById("outLookData").style.display='none';
	DvLayerOpen4PopUP('200','200', 'DvContentPopup2');	
}

function goBackToDomainSelect()
{
	document.getElementById("userLogin").style.display='none';
	DvLayerOpen4PopUP('200','200', 'DvContentPopup2');	
	
}

function HidedvMessage4PopUP()
{ 
	document.getElementById("DvOpaqueLayer").style.display='none';
	document.getElementById("DvContentPopup").style.display='none';
	document.getElementById("FrameHeightPopUP").style.display='none';
}

function HidedvMessage4PopUP1()
{ 
	document.getElementById("DvOpaqueLayer").style.display='none';
	document.getElementById("DvContentPopup1").style.display='none';
	if(document.getElementById("FrameHeightPopUP"))
		document.getElementById("FrameHeightPopUP").style.display='none';
}