var popup=0;

/*---------- FUnction to check IE ----------*/
function IsIE()
{

    return ( navigator.appName=="Microsoft Internet Explorer" );

}//End of IsIE()	

/*---------- FUnction to get browser version ----------*/
function getBrowserVersion(){
	browser_type = navigator.appName;
	function splitString (stringToSplit,separator) 
	{   
	arrayOfStrings = stringToSplit.split(separator)   
	}
	
	var agt=navigator.userAgent.toLowerCase()
	
	major = parseInt(navigator.appVersion)
	var spacer="msie "
	splitString(agt,spacer)
	minor = parseFloat(arrayOfStrings[1])
	return minor;
}//End of getBrowserVersion()	

//document.body.onLoad=generateDiv();
//======================================================
// Function to generate div for form
//======================================================
function generateDiv(){
	if(document.getElementById("lightBox")==null){
		var iFrame = document.createElement("DIV");
		iFrame.setAttribute("id", "lightBox");
		iFrame.className="white_content";
		
		/*if(whichForm=="jan_28_09" || whichForm=="dec_17_08" || whichForm=="nov_25_08" || whichForm=="oct_22_08" || whichForm=="sep_24_08" || whichForm=="aug_20_08" || whichForm=="june_08_08" || whichForm=="apr_30_08" || whichForm=="mar_25_08" || whichForm=="feb_26_08"){
			iFrame.className="video_content";
		}else{
		iFrame.className="white_content";
		}
		*/
		
		var inneriFrame = document.createElement("DIV");
		inneriFrame.setAttribute("id", "formLoader");
		
		/*var inputObj = document.createElement("input");
		inputObj.setAttribute("id", "hiddenSubject");
		inputObj.type="text";
		
		iFrame.appendChild(inputObj);*/
		
		iFrame.appendChild(inneriFrame);
		document.body.appendChild(iFrame);
		
		iFrame = document.createElement("DIV");
		iFrame.setAttribute("id", "fade");	
		iFrame.className="white_overlay";
		document.body.appendChild(iFrame);
	}
}
//======================================================
// menu for Internet Explorer
//======================================================

startList = function() {
	
 if (document.all && document.getElementById) {
	navRoot = document.getElementById("nav");
    if(document.getElementById("nav") != null){
		for (i=0; i<navRoot.childNodes.length; i++) {
		  node = navRoot.childNodes[i];
		  if (node.nodeName=="LI") {
			 node.onmouseover=function() {
				this.className+=" over";
			 }
			 node.onmouseout=function() {
				this.className=this.className.replace(" over", "");
			 }
		  }
		}
	}
 }
}

window.onload= function(){
	startList(); // This is for navigator menu work properly in IE 6
	set_loaded(); // This is called By TS to check page load to set iframe for PDF download for IE.
	if(typeof(elqInitPage) == "function"){
		elqInitPage(); // This is to set Eloqua customer GUID
	}
}

//======================================================
// show _ hide
//======================================================

//var time_out;

function showit(mID) {
	document.getElementById(mID).style.display="block";
}

function hide(mID) {
	document.getElementById(mID).style.display="none";
	}	

//======================================================
// switch stylesheets function
//======================================================


function setActiveStyleSheet(title) {
  var i, a, main;
  for(i=0; (a = document.getElementsByTagName("link")[i]); i++) {
    if(a.getAttribute("rel").indexOf("style") != -1 && a.getAttribute("title")) {
      a.disabled = true;
      if(a.getAttribute("title") == title) a.disabled = false;
    }
  }
}


//======================================================
// DropdownList 
//======================================================

function go(obj) {
	window.location=document.getElementById(obj).value;
	}
	
	
//======================================================
// sIFR 
//======================================================

var hasFlash=function(){var a=6;if(navigator.appVersion.indexOf("MSIE")!=-1&&navigator.appVersion.indexOf("Windows")>-1){document.write('<script language="VBScript"\> \non error resume next \nhasFlash = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash." & '+a+'))) \n</script\> \n');if(window.hasFlash!=null)return window.hasFlash}if(navigator.mimeTypes&&navigator.mimeTypes["application/x-shockwave-flash"]&&navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin){var b=(navigator.plugins["Shockwave Flash 2.0"]||navigator.plugins["Shockwave Flash"]).description;return parseInt(b.charAt(b.indexOf(".")-1))>=a}return false}();String.prototype.normalize=function(){return this.replace(/\s+/g," ")};if(Array.prototype.push==null){Array.prototype.push=function(){var i=0,a=this.length,b=arguments.length;while(i<b){this[a++]=arguments[i++]}return this.length}}if(!Function.prototype.apply){Function.prototype.apply=function(a,b){var c=[];var d,e;if(!a)a=window;if(!b)b=[];for(var i=0;i<b.length;i++){c[i]="b["+i+"]"}e="a.__applyTemp__("+c.join(",")+");";a.__applyTemp__=this;d=eval(e);a.__applyTemp__=null;return d}}function named(a){return new named.Arguments(a)}named.Arguments=function(a){this.oArgs=a};named.Arguments.prototype.constructor=named.Arguments;named.extract=function(a,b){var c,d;var i=a.length;while(i--){d=a[i];if(d!=null&&d.constructor!=null&&d.constructor==named.Arguments){c=a[i].oArgs;break}}if(c==null)return;for(e in c)if(b[e]!=null)b[e](c[e]);return};var parseSelector=function(){var a=/^([^#.>`]*)(#|\.|\>|\`)(.+)$/;function r(s,t){var u=s.split(/\s*\,\s*/);var v=[];for(var i=0;i<u.length;i++)v=v.concat(b(u[i],t));return v}function b(c,d,e){c=c.normalize().replace(" ","`");var f=c.match(a);var g,h,i,j,k,n;var l=[];if(f==null)f=[c,c];if(f[1]=="")f[1]="*";if(e==null)e="`";if(d==null)d=document;switch(f[2]){case "#":k=f[3].match(a);if(k==null)k=[null,f[3]];g=document.getElementById(k[1]);if(g==null||(f[1]!="*"&&!o(g,f[1])))return l;if(k.length==2){l.push(g);return l}return b(k[3],g,k[2]);case ".":if(e!=">")h=m(d,f[1]);else h=d.childNodes;for(i=0,n=h.length;i<n;i++){g=h[i];if(g.nodeType!=1)continue;k=f[3].match(a);if(k!=null){if(g.className==null||g.className.match("(\\s|^)"+k[1]+"(\\s|$)")==null)continue;j=b(k[3],g,k[2]);l=l.concat(j)}else if(g.className!=null&&g.className.match("(\\s|^)"+f[3]+"(\\s|$)")!=null)l.push(g)}return l;case ">":if(e!=">")h=m(d,f[1]);else h=d.childNodes;for(i=0,n=h.length;i<n;i++){g=h[i];if(g.nodeType!=1)continue;if(!o(g,f[1]))continue;j=b(f[3],g,">");l=l.concat(j)}return l;case "`":h=m(d,f[1]);for(i=0,n=h.length;i<n;i++){g=h[i];j=b(f[3],g,"`");l=l.concat(j)}return l;default:if(e!=">")h=m(d,f[1]);else h=d.childNodes;for(i=0,n=h.length;i<n;i++){g=h[i];if(g.nodeType!=1)continue;if(!o(g,f[1]))continue;l.push(g)}return l}}function m(d,o){if(o=="*"&&d.all!=null)return d.all;return d.getElementsByTagName(o)}function o(p,q){return q=="*"?true:p.nodeName.toLowerCase().replace("html:", "")==q.toLowerCase()}return r}();var sIFR=function(){var a="http://www.w3.org/1999/xhtml";var b=false;var c=false;var d;var ah=[];var al=document;var ak=al.documentElement;var am=window;var au=al.addEventListener;var av=am.addEventListener;var f=function(){var g=navigator.userAgent.toLowerCase();var f={a:g.indexOf("applewebkit")>-1,b:g.indexOf("safari")>-1,c:navigator.product!=null&&navigator.product.toLowerCase().indexOf("konqueror")>-1,d:g.indexOf("opera")>-1,e:al.contentType!=null&&al.contentType.indexOf("xml")>-1,f:true,g:true,h:null,i:null,j:null,k:null};f.l=f.a||f.c;f.m=!f.a&&navigator.product!=null&&navigator.product.toLowerCase()=="gecko";if(f.m&&g.match(/.*gecko\/(\d{8}).*/))f.j=new Number(g.match(/.*gecko\/(\d{8}).*/)[1]);f.n=g.indexOf("msie")>-1&&!f.d&&!f.l&&!f.m;f.o=f.n&&g.match(/.*mac.*/)!=null;if(f.d&&g.match(/.*opera(\s|\/)(\d+\.\d+)/))f.i=new Number(g.match(/.*opera(\s|\/)(\d+\.\d+)/)[2]);if(f.n||(f.d&&f.i<7.6))f.g=false;if(f.a&&g.match(/.*applewebkit\/(\d+).*/))f.k=new Number(g.match(/.*applewebkit\/(\d+).*/)[1]);if(am.hasFlash&&(!f.n||f.o)){var aj=(navigator.plugins["Shockwave Flash 2.0"]||navigator.plugins["Shockwave Flash"]).description;f.h=parseInt(aj.charAt(aj.indexOf(".")-1))}if(g.match(/.*(windows|mac).*/)==null||f.o||f.c||(f.d&&(g.match(/.*mac.*/)!=null||f.i<7.6))||(f.b&&f.h<7)||(!f.b&&f.a&&f.k<312)||(f.m&&f.j<20020523))f.f=false;if(!f.o&&!f.m&&al.createElementNS)try{al.createElementNS(a,"i").innerHTML=""}catch(e){f.e=true}f.p=f.c||(f.a&&f.k<312);return f}();function at(){return{bIsWebKit:f.a,bIsSafari:f.b,bIsKonq:f.c,bIsOpera:f.d,bIsXML:f.e,bHasTransparencySupport:f.f,bUseDOM:f.g,nFlashVersion:f.h,nOperaVersion:f.i,nGeckoBuildDate:f.j,nWebKitVersion:f.k,bIsKHTML:f.l,bIsGecko:f.m,bIsIE:f.n,bIsIEMac:f.o,bUseInnerHTMLHack:f.p}}if(am.hasFlash==false||!al.getElementsByTagName||!al.getElementById||(f.e&&(f.p||f.n)))return{UA:at()};function af(e){if((!k.bAutoInit&&(am.event||e)!=null)||!l(e))return;b=true;for(var i=0,h=ah.length;i<h;i++)j.apply(null,ah[i]);ah=[]}var k=af;function l(e){if(c==false||k.bIsDisabled==true||((f.e&&f.m||f.l)&&e==null&&b==false)||(al.body==null||al.getElementsByTagName("body").length==0))return false;return true}function m(n){if(f.n)return n.replace(new RegExp("%\d{0}","g"),"%25");return n.replace(new RegExp("%(?!\d)","g"),"%25")}function as(p,q){return q=="*"?true:p.nodeName.toLowerCase().replace("html:", "")==q.toLowerCase()}function o(p,q,r,s,t){var u="";var v=p.firstChild;var w,x,y,z;if(s==null)s=0;if(t==null)t="";while(v){if(v.nodeType==3){z=v.nodeValue.replace("<","&lt;");switch(r){case "lower":u+=z.toLowerCase();break;case "upper":u+=z.toUpperCase();break;default:u+=z}}else if(v.nodeType==1){if(as(v,"a")&&!v.getAttribute("href")==false){if(v.getAttribute("target"))t+="&sifr_url_"+s+"_target="+v.getAttribute("target");t+="&sifr_url_"+s+"="+m(v.getAttribute("href")).replace(/&/g,"%26");u+='<a href="asfunction:_root.launchURL,'+s+'">';s++}else if(as(v,"br"))u+="<br/>";if(v.hasChildNodes()){y=o(v,null,r,s,t);u+=y.u;s=y.s;t=y.t}if(as(v,"a"))u+="</a>"}w=v;v=v.nextSibling;if(q!=null){x=w.parentNode.removeChild(w);q.appendChild(x)}}return{"u":u,"s":s,"t":t}}function A(B){if(al.createElementNS&&f.g)return al.createElementNS(a,B);return al.createElement(B)}function C(D,E,z){var p=A("param");p.setAttribute("name",E);p.setAttribute("value",z);D.appendChild(p)}function F(p,G){var H=p.className;if(H==null)H=G;else H=H.normalize()+(H==""?"":" ")+G;p.className=H}function aq(ar){var a=ak;if(k.bHideBrowserText==false)a=al.getElementsByTagName("body")[0];if((k.bHideBrowserText==false||ar)&&a)if(a.className==null||a.className.match(/\bsIFR\-hasFlash\b/)==null)F(a, "sIFR-hasFlash")}function j(I,J,K,L,M,N,O,P,Q,R,S,r,T){if(!l())return ah.push(arguments);aq();named.extract(arguments,{sSelector:function(ap){I=ap},sFlashSrc:function(ap){J=ap},sColor:function(ap){K=ap},sLinkColor:function(ap){L=ap},sHoverColor:function(ap){M=ap},sBgColor:function(ap){N=ap},nPaddingTop:function(ap){O=ap},nPaddingRight:function(ap){P=ap},nPaddingBottom:function(ap){Q=ap},nPaddingLeft:function(ap){R=ap},sFlashVars:function(ap){S=ap},sCase:function(ap){r=ap},sWmode:function(ap){T=ap}});var U=parseSelector(I);if(U.length==0)return false;if(S!=null)S="&"+S.normalize();else S="";if(K!=null)S+="&textcolor="+K;if(M!=null)S+="&hovercolor="+M;if(M!=null||L!=null)S+="&linkcolor="+(L||K);if(O==null)O=0;if(P==null)P=0;if(Q==null)Q=0;if(R==null)R=0;if(N==null)N="#FFFFFF";if(T=="transparent")if(!f.f)T="opaque";else N="transparent";if(T==null)T="";var p,V,W,X,Y,Z,aa,ab,ac;var ad=null;for(var i=0,h=U.length;i<h;i++){p=U[i];if(p.className!=null&&p.className.match(/\bsIFR\-replaced\b/)!=null)continue;V=p.offsetWidth-R-P;W=p.offsetHeight-O-Q;aa=A("span");aa.className="sIFR-alternate";ac=o(p,aa,r);Z="txt="+m(ac.u).replace(/\+/g,"%2B").replace(/&/g,"%26").replace(/\"/g, "%22").normalize() + S + "&w=" + V + "&h=" + W + ac.t;F(p,"sIFR-replaced");if(ad==null||!f.g){if(!f.g){if(!f.n)p.innerHTML=['<embed class="sIFR-flash" type="application/x-shockwave-flash" src="',J,'" quality="best" wmode="',T,'" bgcolor="',N,'" flashvars="',Z,'" width="',V,'" height="',W,'" sifr="true"></embed>'].join("");else p.innerHTML=['<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" sifr="true" width="',V,'" height="',W,'" class="sIFR-flash"><param name="movie" value="',J,"?",Z,'"></param><param name="quality" value="best"></param><param name="wmode" value="',T,'"></param><param name="bgcolor" value="',N,'"></param> </object>'].join('')}else{if(f.d){ab=A("object");ab.setAttribute("data",J);C(ab,"quality","best");C(ab,"wmode",T);C(ab,"bgcolor",N)}else{ab=A("embed");ab.setAttribute("src",J);ab.setAttribute("quality","best");ab.setAttribute("flashvars",Z);ab.setAttribute("wmode",T);ab.setAttribute("bgcolor",N)}ab.setAttribute("sifr","true");ab.setAttribute("type","application/x-shockwave-flash");ab.className="sIFR-flash";if(!f.l||!f.e)ad=ab.cloneNode(true)}}else ab=ad.cloneNode(true);if(f.g){if(f.d)C(ab,"flashvars",Z);else ab.setAttribute("flashvars",Z);ab.setAttribute("width",V);ab.setAttribute("height",W);ab.style.width=V+"px";ab.style.height=W+"px";p.appendChild(ab)}p.appendChild(aa);if(f.p)p.innerHTML+=""}if(f.n&&k.bFixFragIdBug)setTimeout(function(){al.title=d},0)}function ai(){d=al.title}function ae(){if(k.bIsDisabled==true)return;c=true;if(k.bHideBrowserText)aq(true);if(am.attachEvent)am.attachEvent("onload",af);else if(!f.c&&(al.addEventListener||am.addEventListener)){if(f.a&&f.k>=132&&am.addEventListener)am.addEventListener("load",function(){setTimeout("sIFR({})",1)},false);else{if(al.addEventListener)al.addEventListener("load",af,false);if(am.addEventListener)am.addEventListener("load",af,false)}}else if(typeof am.onload=="function"){var ag=am.onload;am.onload=function(){ag();af()}}else am.onload=af;if(!f.n||am.location.hash=="")k.bFixFragIdBug=false;else ai()}k.UA=at();k.bAutoInit=true;k.bFixFragIdBug=true;k.replaceElement=j;k.updateDocumentTitle=ai;k.appendToClassName=F;k.setup=ae;k.debug=function(){aq(true)};k.debug.replaceNow=function(){ae();k()};k.bIsDisabled=false;k.bHideBrowserText=true;return k}();

if(typeof sIFR == "function" && !sIFR.UA.bIsIEMac){
	sIFR.setup();
};


//======================================================
// sIFR Function
//======================================================

if(typeof sIFR == "function"){
	sIFR.setup();	  	  
	sIFR.replaceElement(named({sSelector:"h1#title", 
									sFlashSrc:"/fonts/gillsans_light.swf", 
									sColor:"#666666",
									sFlashVars:"textalign=left&offsetTop=0",
									sWmode:"transparent",
									sCase:"upper"
									}));
									};	
									
									
/*-------------------------------------
Feedback
---------------------------------------*/

function showSoftPopUp(whichForm,subject){
	popup=1;
	generateDiv();
	//OpenTestPopup();
	var windowSize = getWindowSize();
	
	var totalHeight = Window1.getScrollHeight();
	var totalWidth = Window1.getScrollWidth();
	if(windowSize.X <978){
		totalWidth = 1000;
	}
	
	var feedbackX = (totalWidth - 540)/2;
	var feedbackY = (totalHeight - 460)/2;
	var feedbackY = feedbackY - 100;
	
	
	document.getElementById("fade").style.height = totalHeight + "px";
	document.getElementById("fade").style.width = totalWidth + "px";
	
	//document.getElementById("fade").style.zIndex=1;
	//document.getElementById("test2").style.zIndex=100;
	document.getElementById("fade").style.display='block';
	
	
	//alert(document.getElementById("wrapper").width + " :: " + windowSize.X + " : " + document.getElementById("wrapper").offsetHeight)
	

	//document.getElementById("light").style.top=feedbackY + "px";
	//document.getElementById("light").style.left=feedbackX + "px";
	
	if(whichForm=="supportForm" ){
		leftPos = ((Window1.getWindowWidth() / 2) - 265)+Window1.getScrollLeft();
		topPos = ((Window1.getWindowHeight() / 2) - 300)+Window1.getScrollTop();
	}
	else if(whichForm=="partners"){
		leftPos = ((Window1.getWindowWidth() / 2) - 265)+Window1.getScrollLeft();
		topPos = ((Window1.getWindowHeight() / 2) - 280)+Window1.getScrollTop();
	}
	else if(whichForm=="newsLetter"){
		leftPos = ((Window1.getWindowWidth() / 2) - 280)+Window1.getScrollLeft();
		topPos = ((Window1.getWindowHeight() / 2) - 125)+Window1.getScrollTop();
	}
	else if(whichForm=="cookies"){
		leftPos = ((Window1.getWindowWidth() / 2) - 280)+Window1.getScrollLeft();
		topPos = ((Window1.getWindowHeight() / 2) - 270)+Window1.getScrollTop();
	}
	else if(whichForm=="jan_28_09"){
		leftPos = ((Window1.getWindowWidth() / 2) - 213)+Window1.getScrollLeft();
		topPos = ((Window1.getWindowHeight() / 2) - 202)+Window1.getScrollTop();
	}
	else if(whichForm=="feb_17_09" || whichForm=="dec_17_08" || whichForm=="nov_25_08" || whichForm=="oct_22_08" || whichForm=="sep_24_08" || whichForm=="aug_20_08" || whichForm=="june_08_08" || whichForm=="apr_30_08" || whichForm=="mar_25_08" || whichForm=="feb_26_08"){
		document.getElementById("lightBox").style.width = '726px';
		document.getElementById("lightBox").style.height = '608px';

		leftPos = ((Window1.getWindowWidth() / 2) - 370)+Window1.getScrollLeft();
		topPos = ((Window1.getWindowHeight() / 2) - 290)+Window1.getScrollTop();
	}
	else if(whichForm=="callBack" || whichForm=="eloquaForm" || whichForm=="serviceCatalog" || whichForm=="shareThisPage"){
		leftPos = ((Window1.getWindowWidth() / 2) - 265)+Window1.getScrollLeft();
		topPos = ((Window1.getWindowHeight() / 2) - 260)+Window1.getScrollTop();
	}
	else{
		leftPos = ((Window1.getWindowWidth() / 2) - 265)+Window1.getScrollLeft();
		topPos = ((Window1.getWindowHeight() / 2) - 250)+Window1.getScrollTop();
	}
	
	document.getElementById("lightBox").style.top = topPos + 'px';
	document.getElementById("lightBox").style.left = leftPos + 'px';
	//document.getElementById("lightBox").style.margin =topPos+"px auto";
	
	document.getElementById("lightBox").style.display='block';
	document.getElementById("formLoader").style.display='block';
	//document.getElementById('queries').style.display='block';
    	
	generateForm(whichForm,subject);

	//window.opener.document.getElementById("closeme").style.display='block';
}

function hideFeedback(){
		
	for(var i = 0; i < arguments.length; i++)
	{
		//window.parent.document.getElementById(arguments[i]).style.display='none';
		var divObj = document.getElementById(arguments[i]);
		document.body.removeChild(divObj);
	}
}

function generateForm(whichForm,subject){
	var myform = document.getElementById("formLoader");
	//var paras = document.getElementsByTagName("p");
	//var formtitle = document.getElementsByTagName("em");
	if(whichForm=="supportForm"){
		myform.innerHTML="<iframe id='myframe' src='/includes/forms/supportForm.php?subject="+subject+"' height=600 width=530 frameborder=0 scrolling=no marginheight=0 marginwidth=0 allowtransparency='true'></iframe>";

		
	}else if(whichForm=="eloquaForm"){
		myform.innerHTML="<iframe id='myframe' src='/includes/forms/eloquaForm.php?subject="+subject+"' height=520 width=530 frameborder=0 scrolling=no marginheight=0 marginwidth=0 allowtransparency='true'></iframe>";
		
	}
	else if(whichForm=="callBack"){
		myform.innerHTML="<iframe id='myframe' src='/includes/forms/callBack.php?subject="+subject+"' height=520 width=530 frameborder=0 scrolling=no marginheight=0 marginwidth=0 allowtransparency='true'></iframe>";
		
	}
	else if(whichForm=="partners"){
		myform.innerHTML="<iframe id='myframe' src='/includes/forms/partners.php?subject="+subject+"' height=560 width=530 frameborder=0 scrolling=no marginheight=0 marginwidth=0 allowtransparency='true'></iframe>";
		
	}
	else if(whichForm=="serviceCatalog"){
		myform.innerHTML="<iframe id='myframe' src='/includes/forms/serviceCatalog.php?subject="+subject+"' height=520 width=530 frameborder=0 scrolling=no marginheight=0 marginwidth=0 allowtransparency='true'></iframe>";
		
	}
	else if(whichForm=="newsLetter"){
		myform.innerHTML="<iframe id='myframe' src='/includes/forms/newsLetter.php?subject="+subject+"' height=250 width=530 frameborder=0 scrolling=no marginheight=0 marginwidth=0 allowtransparency='true'></iframe>";
		
	}
	else if(whichForm=="shareThisPage"){
		myform.innerHTML="<iframe id='myframe' src='/includes/forms/shareThisPage.php?subject="+subject+"' height=520 width=530 frameborder=0 scrolling=no marginheight=0 marginwidth=0 allowtransparency='true'></iframe>";	
	}
	else if(whichForm=="cookies"){
		myform.innerHTML="<iframe id='myframe' src='/resources/enable_cookies.php?subject="+subject+"' height=620 width=780 frameborder=0 scrolling=no marginheight=0 marginwidth=0 allowtransparency='true'></iframe>";	
	}
	else if(whichForm=="enable_cookies"){
		myform.innerHTML="<iframe id='myframe' src='/resources/show_cookies.php?subject="+subject+"' height=620 width=530 frameborder=0 scrolling=no marginheight=0 marginwidth=0 allowtransparency='true'></iframe>";	
	}
	else if(whichForm=="feb_17_09"){
		myform.innerHTML="<iframe id='myframe' src='/includes/recorded_webinars/feb_17_09.php?subject="+subject+"' height=608 width=726 frameborder=0 scrolling=no marginheight=0 marginwidth=0 allowtransparency='true'></iframe>";	
	}
	else if(whichForm=="jan_28_09"){
		myform.innerHTML="<iframe id='myframe' src='/includes/recorded_webinars/jan_28_09.php?subject="+subject+"' height=405 width=426 frameborder=0 scrolling=no marginheight=0 marginwidth=0 allowtransparency='true'></iframe>";	
	}
	else if(whichForm=="dec_17_08"){
		myform.innerHTML="<iframe id='myframe' src='/includes/recorded_webinars/dec_17_08.php?subject="+subject+"' height=608 width=726 frameborder=0 scrolling=no marginheight=0 marginwidth=0 allowtransparency='true'></iframe>";	
	}
	else if(whichForm=="nov_25_08"){
		myform.innerHTML="<iframe id='myframe' src='/includes/recorded_webinars/nov_25_08.php?subject="+subject+"' height=608 width=726 frameborder=0 scrolling=no marginheight=0 marginwidth=0 allowtransparency='true'></iframe>";	
	}
	else if(whichForm=="oct_22_08"){
		myform.innerHTML="<iframe id='myframe' src='/includes/recorded_webinars/oct_22_08.php?subject="+subject+"' height=608 width=726 frameborder=0 scrolling=no marginheight=0 marginwidth=0 allowtransparency='true'></iframe>";	
	}
	else if(whichForm=="sep_24_08"){
		myform.innerHTML="<iframe id='myframe' src='/includes/recorded_webinars/sep_24_08.php?subject="+subject+"' height=608 width=726 frameborder=0 scrolling=no marginheight=0 marginwidth=0 allowtransparency='true'></iframe>";	
	}
	else if(whichForm=="aug_20_08"){
		myform.innerHTML="<iframe id='myframe' src='/includes/recorded_webinars/aug_20_08.php?subject="+subject+"' height=608 width=726 frameborder=0 scrolling=no marginheight=0 marginwidth=0 allowtransparency='true'></iframe>";	
	}
	else if(whichForm=="june_08_08"){
		myform.innerHTML="<iframe id='myframe' src='/includes/recorded_webinars/june_08_08.php?subject="+subject+"' height=608 width=726 frameborder=0 scrolling=no marginheight=0 marginwidth=0 allowtransparency='true'></iframe>";	
	}
	else if(whichForm=="apr_30_08"){
		myform.innerHTML="<iframe id='myframe' src='/includes/recorded_webinars/apr_30_08.php?subject="+subject+"' height=608 width=726 frameborder=0 scrolling=no marginheight=0 marginwidth=0 allowtransparency='true'></iframe>";	
	}
	else if(whichForm=="mar_25_08"){
		myform.innerHTML="<iframe id='myframe' src='/includes/recorded_webinars/mar_25_08.php?subject="+subject+"' height=608 width=726 frameborder=0 scrolling=no marginheight=0 marginwidth=0 allowtransparency='true'></iframe>";	
	}
	else if(whichForm=="feb_26_08"){
		myform.innerHTML="<iframe id='myframe' src='/includes/recorded_webinars/feb_26_08.php?subject="+subject+"' height=608 width=726 frameborder=0 scrolling=no marginheight=0 marginwidth=0 allowtransparency='true'></iframe>";	
	}
	else{
		myform.innerHTML="<iframe id='myframe' src='/includes/forms/update_case.php?subject="+subject+"' height=500 width=530 frameborder=0 scrolling=no marginheight=0 marginwidth=0 allowtransparency='true'></iframe>";
	}
   //alert(mydiv.innerHTML);
   //alert(window.pageXOffset);
}

function show_Thanks(msg){
	hideFeedback('lightBox')
	
	var divObj = document.createElement("DIV");
	divObj.className="statusMsg";
	document.body.appendChild(divObj);
	
	leftPos = ((Window1.getWindowWidth() / 2) - 150)+Window1.getScrollLeft();
	topPos = ((Window1.getWindowHeight() / 2) - 25)+Window1.getScrollTop();
	
	divObj.style.width=220 + 'px';
	//divObj.style.height = 50 + 'px';
	
	divObj.style.top = topPos + 'px'; 
	divObj.style.left = leftPos + 'px';
	divObj.innerHTML=msg;
	divObj.style.display="block";
	
	var count=0;
    var myInt = setInterval(function(){
									 count ++;
									 if(count==5){
										 clearInterval(myInt);
										 document.body.removeChild(divObj);
										 divObj=null;
										 hideFeedback('fade');
									 }
									 },1000);
}


/*

function createWashOut(){
	var bodyElement  = document.getElementsByTagName('body')[0];
	var div = document.createElement('div');
	div.setAttribute('id','washout');
	bodyElement.appendChild(div);
	var totalWash = document.body.offsetHeight;
	document.getElementById("washout").style.height = totalWash + "px";
	document.getElementById("washout").innerHTML="<!--[if lte IE 6.5]><iframe></iframe><![endif]-->"
	bodyElement.style.overflow='hidden';
	
	}
function removeWashOut(){
	var bodyElement  = document.getElementsByTagName('body')[0];
	var remove = document.getElementById('washout');
	bodyElement.removeChild(remove);
	bodyElement.style.overflow='';
	}
	*/
	
/*----------------------------------------------------------------------------------Form Validations & Submition -----------------------------------------------*/	

//Function to validate support form
	
function validateForm(theform)
{
	
	//---------------------------------------------------------------------------------------------------------------------------------	
	if(theform.name=="serviceCatalog" || theform.name=="support" || theform.name=="eloqua" || theform.name=="callBack" || theform.name=="sharePage" || theform.name=="partners") {
		var firstName = trim(document.getElementById("firstName").value);
		var lastName = trim(document.getElementById("lastName").value);
	}
	//---------------------------------------------------------------------------------------------------------------------------------	
	if(theform.name=="serviceCatalog" || theform.name=="support" || theform.name=="eloqua" || theform.name=="callBack" || theform.name=="partners") {
		var jobTitle = trim(document.getElementById("jobTitle").value);
		var company = trim(document.getElementById("company").value);
	}
	
	//---------------------------------------------------------------------------------------------------------------------------------	
	if(theform.name=="serviceCatalog" || theform.name=="support" || theform.name=="eloqua" || theform.name=="callBack") {
		var phone= trim(document.getElementById("phone").value);
	}
	//---------------------------------------------------------------------------------------------------------------------------------
	if(theform.name=="serviceCatalog" || theform.name=="support" || theform.name=="eloqua" || theform.name=="callBack" || theform.name=="newsLetter" || theform.name=="sharePage" || theform.name=="partners") {
		var email = trim(document.getElementById("email").value);
	}
	//---------------------------------------------------------------------------------------------------------------------------------	
	
	if(theform.name=="partners"){
		var role= trim(document.getElementById("role").value);
		var industry= trim(document.getElementById("industry").value);
		var company_size= trim(document.getElementById("company_size").value);
	//	var comments= document.getElementById("comments").value;
	}
	
	//---------------------------------------------------------------------------------------------------------------------------------	
	if(theform.name=="updateCase" || theform.name=="serviceCatalog" || theform.name=="support" || theform.name=="eloqua" || theform.name=="callBack"){
		var country= trim(document.getElementById("country").value);
	}
	//---------------------------------------------------------------------------------------------------------------------------------	
	if((theform.name=="callBack" || theform.name=="support" || theform.name=="eloqua" || theform.name=="serviceCatalog") && country=="United States"){
		var state= trim(document.getElementById("state").value);
	}
	//---------------------------------------------------------------------------------------------------------------------------------	
	if(theform.name=="updateCase" || theform.name=="support" ){
		var message= trim(document.getElementById("message").value);
	}
	//---------------------------------------------------------------------------------------------------------------------------------	
	if(theform.name=="updateCase"){
		var ticketNumber = trim(document.getElementById("ticketNumber").value);
	}
	//---------------------------------------------------------------------------------------------------------------------------------	
	if(theform.name=="serviceCatalog"){
		var postal = trim(document.getElementById("postal").value);
	}
	//---------------------------------------------------------------------------------------------------------------------------------	
	if(theform.name=="sharePage"){
		var recvFirstName = trim(document.getElementById("recvFirstName").value);
		var recvLastName = trim(document.getElementById("recvLastName").value);
		var recvEmail = trim(document.getElementById("recvEmail").value);
	}
	
	//---------------------------------------------------------------------------------------------------------------------------------	
	if(theform.name=="serviceCatalog" || theform.name=="support" || theform.name=="eloqua" || theform.name=="callBack" || theform.name=="sharePage" || theform.name=="partners"){
		if(firstName==""){
			showError("You must enter your First Name.","firstName");
			return false;
		}
		else{
			changeProper('firstName');
		}
		
		if(lastName==""){
			showError("You must enter your Last Name.","lastName");
			return false;
		}
		else{
			changeProper('lastName');
		}
	}
	//---------------------------------------------------------------------------------------------------------------------------------	
	if(theform.name=="serviceCatalog" || theform.name=="support" || theform.name=="eloqua" || theform.name=="callBack" || theform.name=="newsLetter" || theform.name=="sharePage" || theform.name=="partners"){	
		if(email==""){
			showError("You must enter your Email ID.","email");
			return false;
		}else{
			changeProper('email');
		} 
		
		if(!isValidEmail(email))
		{
			showError("Invalid Email ID.","email");
			return false;
		}else{
			changeProper('email');
		}
	}
	//---------------------------------------------------------------------------------------------------------------------------------	
	if(theform.name=="serviceCatalog" || theform.name=="support" || theform.name=="eloqua" || theform.name=="callBack" || theform.name=="partners") {
		if(jobTitle==""){
			showError("You must enter your Job Title.","jobTitle");
			return false;
		}
		else{
			changeProper('jobTitle');
		}
		
		if(company==""){
			showError("You must enter your Company Name.","company");
			return false;
		}else{
			changeProper('company');
		}
	}
		
	//---------------------------------------------------------------------------------------------------------------------------------	
	if(theform.name=="updateCase"){
		if(ticketNumber==""){
			showError("You must enter your Ticket Number.","ticketNumber");
			return false;
		}else if(!isValidLength(ticketNumber,6,8)){
			showError("The Ticket Number must be of 7 characters","ticketNumber");
			return false;
		}else{
			changeProper('ticketNumber');
		}
	}
	
	//---------------------------------------------------------------------------------------------------------------------------------	
	
	
	//---------------------------------------------------------------------------------------------------------------------------------	
	if(theform.name=="updateCase" || theform.name=="serviceCatalog" || theform.name=="support" || theform.name=="eloqua" || theform.name=="callBack"  || theform.name=="partners"){
		if(country==""){
			showError("You must select a Country.","country");
			return false;
		}else{
			changeProper('country');
		}
	}
	
	//---------------------------------------------------------------------------------------------------------------------------------	
	if((theform.name=="callBack" || theform.name=="support" || theform.name=="eloqua" || theform.name=="serviceCatalog") && country=="United States"){
		if(state==""){
			showError("You must select a state/province.","state");
			return false;
		}else{
			changeProper('state');
		}
	}
	//---------------------------------------------------------------------------------------------------------------------------------	
	/*
	if(theform.name=="partners"){
		if(company_size==""){
			showError("You must select your Company Size.","company_size");
			return false;
		}else{
			document.getElementById("subject").value = "Partnership Opportunity with [" + company +"]";
			changeProper('company_size');
		}
		
		if(comments==""){
			showError("You must enter your Comments.","comments");
			return false;
		}else{
			changeProper('comments');
		}
	}
	*/
	//---------------------------------------------------------------------------------------------------------------------------------	
	if(theform.name=="serviceCatalog" || theform.name=="support" || theform.name=="eloqua" || theform.name=="callBack"){
		if(phone==""){
			showError("You must enter your Phone Number.","phone");
			return false;
		}else{
			changeProper('phone');
		}
	
	    if(!isNumber(phone))
		{
			showError("The Phone Number field can only contain numbers.","phone");
			return false;
		}else{
			changeProper('phone');
		}
	}
	
	//---------------------------------------------------------------------------------------------------------------------------------	
	if(theform.name=="updateCase" || theform.name=="support" ){
		if(message==""){
			showError("You must enter your Message.","message");
			return false;
		}else{
			changeProper('message');
		}
	}
	
	//---------------------------------------------------------------------------------------------------------------------------------	
	if(theform.name=="serviceCatalog"){
		if(postal==""){
			showError("You must enter your Postal Code.","postal");
			return false;
		}
		else{
			changeProper('postal');
		}
		/*if(!isNumber(postal))
		{
			showError("The Postal Code field can only contain numbers.","postal");
			return false;
		}else{
			changeProper('postal');
		}*/
	}
	//---------------------------------------------------------------------------------------------------------------------------------	
	if(theform.name=="sharePage"){
		if(recvFirstName==""){
			showError("You must enter the recipient's First Name.","recvFirstName");
			return false;
		}
		else{
			changeProper('recvFirstName');
		}
		
		if(recvLastName==""){
			showError("You must enter the recipient's Last Name.","recvLastName");
			return false;
		}
		else{
			changeProper('recvLastName');
		}
	}
	//---------------------------------------------------------------------------------------------------------------------------------	
	if(theform.name=="sharePage"){	
		if(recvEmail==""){
			showError("You must enter the recipient's Email ID.","recvEmail");
			return false;
		}else{
			changeProper('recvEmail');
		} 
		
		if(!isValidEmail(recvEmail))
		{
			showError("Invalid Email ID.","recvEmail");
			return false;
		}else{
			changeProper('recvEmail');
		}
	}
		//toogleElement('msg','none')
		//showThanks(theform)	
	 return true; 	
}										

/*------------------Function to trim the data (Remove the blank spaces)----------------- */
function trim(str)
{
    if(!str || typeof str != 'string')
        return null;

    return str.replace(/^[\s]+/,'').replace(/[\s]+$/,'').replace(/[\s]{2,}/,' ');
}
/*------------------Function to validate blank value ----------------- */
function isBlank(val)
{
	
	if (val=="")
	{
		return true;
	}
	return false;
	
}//End of isBlank()	
/*------------------Function to validate for alphaNumeric value ----------------- */
function isAlphaNumeric(val)
{
	if (val.match(/[a-zA-Z]/)){
		if (val.match(/[0-9]/)){
			return true;
		}
		return false;
	}
	return false;
	
}//End of isAlphaNumeric()	

/*------------------Function to validate length  ----------------- */
function isValidLength(val,minLength,maxLength)
{
	if (val.length > minLength && val.length < maxLength){
			return true;
	}
	return false;
	
}//End of isValidLength()	

/*------------------Function to confirm the password value ----------------- */
function ismatch(newVal,cofirmVal)
{
	if (newVal==cofirmVal)
	{
		return true;
	}
	return false;

}//End of ismatch()	

/*------------------Function to validate for Number  ----------------- */
function isNumber(value){
  var iChars = "0123456789";
  for (var i = 0; i < value.length; i++) {
  	if (iChars.indexOf(value.charAt(i)) == -1) 
  	{
  		return false;
  	}
  }	
  return true;
}//End of isNumber()	

/*------------------Function to validate email  ----------------- */
function trim(str)
{ 
	return((""+str).replace(/^\s*([\s\S]*\S+)\s*$|^\s*$/,'$1') ); 
}

function isValidEmail(value){
	var filter=/^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i;
	if(filter.test(trim(value)))
		return true;
	else
		return false;
	
}//End of isValidEmail()	

/*------------------Function to hide/show a same div ----------------- */
function toogleElement(EleName,style){
	var objEle = document.getElementById(EleName);
	if(objEle)
		objEle.style.display=style;
}//End of toogleElement()	

/*------------------Function to hide/show a same div ----------------- */
function showNotification(msg){
	showStatus(msg,'statusMsg');
}//End of showNotification()	

function showError(msg,obj){
	showStatus(msg,'statusErr');
	document.getElementById(obj).focus();
	changeError(obj);
}//End of ismatch()	

function showStatus(msg,type){

	var ele = document.getElementById('msg');
	ele.innerHTML = msg;
	ele.className = type;

	toogleElement('msg','block');
	/*try{
	increaseHeight()
	}catch(e){}*/
}//End of showStatus()	

function changeError(id){
	document.getElementById(id).style.borderStyle="solid";
	document.getElementById(id).style.borderColor="red";
}//End of changeError()	

function changeProper(id){
	document.getElementById(id).style.borderStyle="";
	document.getElementById(id).style.borderColor="";
	toogleElement('msg','none');
}//End of changeProper()	

//To get window size
function getWindowSize()
{
  var myWidth = 0, myHeight = 0;
 
  if( typeof( window.innerWidth ) == 'number' )
  {
    //Non-IE
        myWidth = window.innerWidth;
        myHeight = window.innerHeight;
  }
  else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) )
  {
       //IE 6+ in 'standards compliant mode'
        myWidth = document.documentElement.clientWidth ;
        myHeight = document.documentElement.clientHeight;
  }
  else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) )
  {
    //IE 4 compatible
        myWidth = document.body.clientWidth;
        myHeight = document.body.clientHeight;
  }
 
  var X= myWidth;
  var Y= myHeight;
 
  return {X:X, Y:Y};
}

Window1 = {	
	//Returns an integer representing the width of the browser window (without the scrollbar).
	getWindowWidth : function() {
	return (document.layers||(document.getElementById&&!document.all)) ? window.outerWidth : (document.all ? document.body.clientWidth : 0);
	},
	
	//Returns an integer representing the height of the browser window (without the scrollbar).
	getWindowHeight : function() {	
	return window.innerHeight ? window.innerHeight :(document.getBoxObjectFor ? Math.min(document.documentElement.clientHeight, document.body.clientHeight) : ((document.documentElement.clientHeight != 0) ? document.documentElement.clientHeight : (document.body ? document.body.clientHeight : 0)));
	},	
	
	//Returns an integer representing the scrollWidth of the window. 
	getScrollWidth : function() {
		return document.all ? Math.max(Math.max(document.documentElement.offsetWidth, document.documentElement.scrollWidth), Math.max(document.body.offsetWidth, document.body.scrollWidth)) : (document.body ? document.body.scrollWidth : ((document.documentElement.scrollWidth != 0) ? document.documentElement.scrollWidth : 0));
	},
	
	//Returns an integer representing the scrollHeight of the window. 
	getScrollHeight : function(){		
		return document.all ? Math.max(Math.max(document.documentElement.offsetHeight, document.documentElement.scrollHeight), Math.max(document.body.offsetHeight, document.body.scrollHeight)) : (document.body ? document.body.scrollHeight : ((document.documentElement.scrollHeight != 0) ? document.documentElement.scrollHeight : 0));
	},			
	
	//Returns an integer representing the scrollLeft of the window (the number of pixels the window has scrolled from the left).
	getScrollLeft : function() {
		return document.all ? (!document.documentElement.scrollLeft ? document.body.scrollLeft : document.documentElement.scrollLeft) : ((window.pageXOffset != 0) ? window.pageXOffset : 0);
	},
	
	//Returns an integer representing the scrollTop of the window (the number of pixels the window has scrolled from the top).
	getScrollTop : function() {
		return document.all ? (!document.documentElement.scrollTop ? document.body.scrollTop : document.documentElement.scrollTop) : ((window.pageYOffset != 0) ? window.pageYOffset : 0);
	}
}
		
//Test function		
function OpenTestPopup() {
	alert("Window Width : " + Window.getWindowWidth() + " px\n"
		+ "Window Height : " + Window.getWindowHeight() + " px\n"
		+ "Scroll Width : " + Window.getScrollWidth() + " px\n"
		+ "Scroll Height : " + Window.getScrollHeight() + " px\n"
		+ "Scroll Left : " + Window.getScrollLeft() + " px\n"
		+ "Scroll Top : " + Window.getScrollTop() + " px");
}

/*------------------Function to check cookies enabled  ------------------------- */
function check_cookies(){
	    if(!navigator.cookieEnabled){
             //alert('Your browser has cookies disabled.');
			 //document.getElementById("cookies_div").style.display="block";
			 showSoftPopUp('cookies','how to enable browser cookies');
			 return false;
		}else{
			 return true;
		}
}//End Of check_cookies()------------------------------------------------------

//-----------------------------THIS CODE IS FOR REGISTRAION FLOW PROCESS-------------------------------------------------------------------------------
<!--
var errorDiv="";
var errorField="";

/*------------------Function to validate lookup form ------------------------- */
function checklookupForm(theForm) {
	clearRegistraionForm();
	errorDiv="msg1";
    	
    if(!checkEmail(theForm.lookupEmail))
		return false;
	
	hideRegistrationError();
	return check_cookies();
        
}//End Of checklookupForm()----------------------------------------------------

/*------------------Function to validate Registraion form ------------------------- */
function checkWholeForm(theForm) {
	
	clearLookUpForm();
	errorDiv="msg2";
    
    if(!checkStandardInput(theForm.firstName,'your <b>first name</b>'))
		return false;
			
    if(!checkStandardInput(theForm.lastName,'your <b>last name</b>'))
		return false;
			
    if(!checkStandardInput(theForm.jobTitle,'your <b>job title</b>'))
		return false;
		
	if(!checkStandardInput(theForm.company,'your <b>company name</b>'))
		return false;
		
    if(!checkEmail(theForm.email))
		return false;
		
	if(!checkNumber(theForm.phone,'<b>business phone number</b>'))
		return false;	
	
	if(!checkStandardInput(theForm.city,'the <b>city</b> you are from'))
		return false;
		
	if(!checkStandardInput(theForm.zip,'the city <b>Zip/Postal Code</b> you are from'))
		return false;
	
	if(!checkStandardInput(theForm.state,'the <b>state/province</b> you are from'))
		return false;
		
    if(!checkStandardInput(theForm.country,'the <b>country</b> you are from'))
		return false;
		
	if(theForm.name=="updateForm" && theForm.email.value != theForm.emailHidden.value ){
		document.getElementById("reg_form").style.display="none";
		document.getElementById("notify_div").style.display="block";
		document.getElementById("activation_done").style.display="none";
		return false;
	}

	hideRegistrationError();
    return true;
    
}//End Of checkWholeForm()----------------------------------------------------

/*------------------Function to check field length and blank validation ------------------------- */
// checks the string is not empty
// checks that the string contains legal characters
function checkStandardInput (fieldObj, field_name) {
	var error = '';
	var strng = fieldObj.value;
	var illegalChars = /\W/;
	if (strng == ''|| strng=='selectCad') {
		error =  '<p>Please enter ' + field_name + '</p>';
	// allow only letters, numbers, and underscores
	//} else if (illegalChars.test(strng)) {
	//	error = field_name + ' contains illegal characters\\n';
	// strings has to be at least 2 characters long
	} /*else if (strng.length < 2) {
		error =  '<h4>Missing Field</h4>';
		error += '<p>'+ field_name + ' is too short</p>';
	}*/
	
	if(error!=""){
		showRegistrationError(error,fieldObj)
		return false;
	}else{
		fieldClearStatus(fieldObj);
		return true;
	}
}//End Of checkStandardInput()----------------------------------------------------

/*------------------Function to check email validation ------------------------- */
function checkEmail(fieldObj) {
	var error='';
	var strng = fieldObj.value;
	var emailFilter=/^.+@.+\..{2,3}$/;
	var emailFilter2=/^.+@hotmail|aol|yahoo\.com$/;
	var illegalChars= /[\(\)\<\>\,\;\:\\\"\[\]]/;
	if (strng == '') {
		error = '<p>Please enter your <b>email address</b></p>';
	} else if (!(emailFilter.test(strng))) { 
		error = '<p>The <b>e-mail address</b> you have entered is invalid</p>';

	/*} else if (emailFilter2.test(strng.toLowerCase())) { 
		error = '<p>Please do not use <b>Hotmail ,Yahoo</b> or an <b>AOL</b> e-mail address</p>';*/
	
	} else if (strng.match(illegalChars)) {
		error = '<p>The <b>e-mail address</b> you have entered contains invalid character(s)</p>';
	}
	
	if(error!=""){
		showRegistrationError(error,fieldObj)
		return false;
	}else{
		fieldClearStatus(fieldObj);
		return true;
	}
}//End Of checkEmail()----------------------------------------------------

/*------------------Function to validate fields for number ------------------------- */
function checkNumber(fieldObj,msg) {
	var error='';
	var strng = fieldObj.value;
	//strip out acceptable non-numeric characters
	var stripped = strng.replace(/[\(\)\.\-\ ]/g, '');
	if (strng == '') {
		error = '<p>Please enter your '+msg+'</p>';
	} else if (isNaN(stripped)==true) {
		error = '<p>The '+msg+' you have entered contains invalid character(s)</p>';
	}
	if(error!=""){
		showRegistrationError(error,fieldObj)
		return false;
	}else{
		fieldClearStatus(fieldObj);
		return true;
	}
}//End Of checkNumber()------------------------------------------

//-->
/*------------------Function to display error div with error message ------------------------- */
function showRegistrationError(msg,obj){
	//alert(document.getElementById(errorDiv).getElementsByTagName("p"));
	fieldErrorStatus(obj);
	document.getElementById(errorDiv).getElementsByTagName("div")[0].innerHTML=msg;
	document.getElementById(errorDiv).style.display="block";
}//End Of showRegistrationError()----------------------------------------------------

/*------------------Function to hide error div ------------------------------------ */
function hideRegistrationError(){
	document.getElementById(errorDiv).style.display="none";
}//End Of hideRegistrationError()----------------------------------------------------

/*------------------Function to heighlight the error filed ------------------------- */
function fieldErrorStatus(obj){
	obj.focus();
	obj.style.borderStyle="solid";
	obj.style.borderColor="red";
	errorField=obj;
}//End Of fieldErrorStatus()----------------------------------------------------

/*------------------Function to remove thr heighlight from error filed --------------------- */
function fieldClearStatus(obj){
	obj.style.borderStyle="";
	obj.style.borderColor="";
}//End Of fieldClearStatus()----------------------------------------------------

/*------------------Function to clear errors from lookup form ------------------------- */
function clearLookUpForm(){
	if(document.getElementById("msg1")!=null)
		document.getElementById("msg1").style.display="none";
	if(errorField !="")
		fieldClearStatus(errorField);
}//End Of clearLookUpForm()----------------------------------------------------

/*------------------Function to clear errors from registraion form ------------------------- */
function clearRegistraionForm(){
	document.getElementById("msg2").style.display="none";
	if(errorField !="")
		fieldClearStatus(errorField);
}//End Of clearRegistraionForm()----------------------------------------------------

/*------------------Function to clear errors from registraion form ------------------------- */
function submit_update_form(){
	document.updateForm.action="registration.php";
	document.updateForm.submit();
}//End Of clearRegistraionForm()----------------------------------------------------

/*------------------Function to clear errors from registraion form ------------------------- */
function cancel_update_submit(){
	document.getElementById("reg_form").style.display="block";
	document.getElementById("notify_div").style.display="none";
}//End Of clearRegistraionForm()----------------------------------------------------

/*------------------Function to start time to redirect page after sertain time period ------------------------- */
var myRInt="";
function redirect_start(url){
	var rIntCnt=0;
	myRInt = setInterval(function(){
								rIntCnt++;
								//document.write(rIntCnt); 
								if(rIntCnt>=10){
									clearInterval(myRInt);
									redirect_url(url);
								}
								  },1000)
}//End Of redirect_start()----------------------------------------------------

/*------------------Function to redirect the page to given URL ------------------------- */
function redirect_url(url){
	clearInterval(myRInt);
	window.location.href=url;
}//End Of redirect_url()----------------------------------------------------

/*------------------Function to Refresh a page ------------------------- */
function refresh_page(){
	var url="";
	var str=window.parent.location.href;
	if(str.match("registration.php")!=null){
		parent.location.reload();
	}else if(str.match("activation.php")!=null)	{
		if(str.match("set=yes") != null){
			url = str.substr(0,str.indexOf("set=yes")-1);
		}else{
			url = str;
		}
		window.parent.location.href=url;
	}
	//alert(url);
	
}//End Of refresh_page()----------------------------------------------------

/*------------------Function to download resource by using Iframe ------------------------- */
var myInt="";
function downloadResource(url){
	clearInterval(myInt);
	if(IsIE()){
		myInt=setInterval(function(){
							   if(page_loaded){
								   //document.getElementById("downloadIframe").src= "/elqNow/elqRedir.htm?ref=http://www.oblicore.com/resources/library/"+url;
									window.frames["downloadIframe"].location.href="/elqNow/elqRedir.htm?ref=http://www.oblicore.com/resources/library/"+url;
									clearInterval(myInt);
							   }
							   },500);
	}else{
		document.getElementById("downloadIframe").src= "/elqNow/elqRedir.htm?ref=http://www.oblicore.com/resources/library/"+url;
	}
	
	
}//End Of downloadResource()----------------------------------------------------

/*------------------Function to set page_loaded 1 after page load complete ------------------------- */
var page_loaded=0;
function set_loaded(){
	page_loaded=1;
}//End Of set_loaded()----------------------------------------------------

/*--------------------------------Ajax Function----AHTSHAm ASGHAr------------*/
var _url;
var _data;
var _dynCont;

function loadDynData(url,data,dynCont){

	_url=url;
	_data=data;
	_dynCont=dynCont;
	loadData();
}
function loadData(){
	
	if(window.XMLHttpRequest){
		
		//used for netscape firefox and other browsers of this genere
		request = new XMLHttpRequest();
	}else if (window.ActiveXObject){
		
		try{
			request = new XMLHttpRequest(); // Firefox, Opera 8.0+, Safari
		}catch (e){
			try{
				request = new ActiveXObject("Msxml2.XMLHTTP");
			}catch (e){
				//used for internet explorer // we are not supporting this for now as its not fully compatable with that
				request = new ActiveXObject("Microsoft.XMLHTTP");
			}
		}
	}
	if (request){
		
		d = new Date();  //as it always uses cache so u must include timestamp with url
		request.onreadystatechange = pageLoaded;

		//sending data with get method  // will be working with posts latter
		request.open("get", _url+"?"+_data+"&"+ d.toString(), true); 
		request.send("");
	}
}

//this function will be called when requested pages starts executing
function pageLoaded(){ 
	if (request.readyState == 4){ // Request Sent
	
		//request.status 200 means page is executed and downloaded completed
		if (request.status == 200){
			
			//all the data returned from the page is stored in "data" variable
			//now you can use this data either to refresh anypart of this page or to make any decision
			data=request.responseText;

			// we will put data received from server in html object for which request was sent
			document.getElementById(_dynCont).innerHTML=data;
/*			try{
				afterAjax();
			}catch(t){}
*/			//document.getElementById(_dynCont).value=data;
		}
	}
}