// JScript File
function postBack()
{
        var viewID = document.getElementById('viewMode')
        window.location.href = viewID.value;
}
function bookmark(url,title){
  /*if ((navigator.appName == "Microsoft Internet Explorer") && (parseInt(navigator.appVersion) >= 4)) {
  window.external.AddFavorite(url,title);
  } else if (navigator.appName == "Netscape") {
    window.sidebar.addPanel(title,url,"");
  } else {
    alert("Press CTRL-D (Netscape) or CTRL-T (Opera) to bookmark");
  }*/
  bookmarksite(title.replace("'","\\'"), url);
}
function bookmarksite(title,url){
if (window.sidebar) // firefox
	window.sidebar.addPanel(title, url, "");
else if(window.opera && window.print){ // opera
	var elem = document.createElement('a');
	elem.setAttribute('href',url);
	elem.setAttribute('title',title);
	elem.setAttribute('rel','sidebar');
	elem.click();
} 
else if(document.all)// ie
	window.external.AddFavorite(url, title);
}

function bodyOnLoad(event){
}
function bodyOnMouseMove(event){
try{
movers(event);
}
catch(err)
{}
}
function changeColor(object)
{
    var obj = object;
    obj.style.backgroundColor="#EAEAEA";   
}
function revertColor(object)
{
    var obj = object;
    obj.style.backgroundColor="#FFFFFF";
}
/***************************/
//@Author: Zulfaqar Naqvi
//@website: www.seisoms.com
//@email: zulfiqar.naqvi@seismologyonline.com
//@license: Feel free to use it, but keep this credits please!					
/***************************/

//SETTING UP OUR POPUP
//0 means disabled; 1 means enabled;
var popupStatus = 0;
var currentEnableDiv = "";

var Browser = {
  Version: function() {
    var version = 999; // we assume a sane browser
    if (navigator.appVersion.indexOf("MSIE") != -1)
      // bah, IE again, lets downgrade version number
      version = parseFloat(navigator.appVersion.split("MSIE")[1]);
    return version;
  }
}



//loading popup with jQuery magic!
function loadPopup(divId){
	//loads popup only if it is disabled
	if(popupStatus==0){
		jQuery("#backgroundPopup").css({
			"opacity": "0.7"
		});
        if (Browser.Version() < 7) {
        try{
		hideSelectBoxes();
		if(document.getElementById("ddltitle")!=null)
		{
		    document.getElementById("ddltitle").style.visibility = "visible";
		}
		if(document.getElementById("ddlNationality")!=null)
		{
		   document.getElementById("ddlNationality").style.visibility = "visible";
		}
		if(document.getElementById("ddlCountry")!=null)
		{
		   document.getElementById("ddlCountry").style.visibility = "visible";
		}
		if(document.getElementById("ddlContactType")!=null)
		{
		  document.getElementById("ddlContactType").style.visibility = "visible";
		}
		
		
		
		}catch(e){}
		}
		jQuery("#backgroundPopup").fadeIn("slow");
		jQuery(divId).fadeIn("slow");
		popupStatus = 1;
		
	}
}

//disabling popup with jQuery magic!
function disablePopup(divId){
	//disables popup only if it is enabled
	if(popupStatus==1){
		jQuery("#backgroundPopup").fadeOut("slow");
		jQuery(divId).fadeOut("slow");
		popupStatus = 0;
		showSelectBoxes();
		try
		{document.getElementById('headerimg').style.display = "block";}catch(eex){}
	}
}

function hideSelectBoxes(){
	selects = document.getElementsByTagName("select");
	for (i = 0; i != selects.length; i++) {
		selects[i].style.visibility = "hidden";
	}
}

function showSelectBoxes(){
	selects = document.getElementsByTagName("select");
	for (i = 0; i != selects.length; i++) {
		selects[i].style.visibility = "visible";
	}
}



function getPageScroll(){

	var yScroll;

	if (self.pageYOffset) {
		yScroll = self.pageYOffset;
	} else if (document.documentElement && document.documentElement.scrollTop){	 // Explorer 6 Strict
		yScroll = document.documentElement.scrollTop;
	} else if (document.body) {// all other Explorers
		yScroll = document.body.scrollTop;
	}

	arrayPageScroll = new Array('',yScroll) 
	return arrayPageScroll;
}
function getPageSize(){
	
	var xScroll, yScroll;
	
	if (window.innerHeight && window.scrollMaxY) {	
		xScroll = document.body.scrollWidth;
		yScroll = window.innerHeight + window.scrollMaxY;
	} else if (document.body.scrollHeight > document.body.offsetHeight){ // all but Explorer Mac
		xScroll = document.body.scrollWidth;
		yScroll = document.body.scrollHeight;
	} else { // Explorer Mac...would also work in Explorer 6 Strict, Mozilla and Safari
		xScroll = document.body.offsetWidth;
		yScroll = document.body.offsetHeight;
	}
	
	var windowWidth, windowHeight;
	if (self.innerHeight) {	// all except Explorer
		windowWidth = self.innerWidth;
		windowHeight = self.innerHeight;
	} else if (document.documentElement && document.documentElement.clientHeight) { // Explorer 6 Strict Mode
		windowWidth = document.documentElement.clientWidth;
		windowHeight = document.documentElement.clientHeight;
	} else if (document.body) { // other Explorers
		windowWidth = document.body.clientWidth;
		windowHeight = document.body.clientHeight;
	}	
	
	// for small pages with total height less then height of the viewport
	if(yScroll < windowHeight){
		pageHeight = windowHeight;
	} else { 
		pageHeight = yScroll;
	}

	// for small pages with total width less then width of the viewport
	if(xScroll < windowWidth){	
		pageWidth = windowWidth;
	} else {
		pageWidth = xScroll;
	}
	arrayPageSize = new Array(pageWidth,pageHeight,windowWidth,windowHeight) 
	return arrayPageSize;
}
//centering popup
function centerPopup(divId){
	//request data for centering
	var windowWidth = document.documentElement.scrollWidth;
	var windowHeight = document.documentElement.scrollHeight;
	var popupHeight = jQuery(divId).height();
	var popupWidth = jQuery(divId).width();
	var top = 0;
	
	var arrayPageSize = getPageSize();
    var arrayPageScroll = getPageScroll();
	top = arrayPageScroll[1] + (arrayPageSize[3] / 15);
		
	//centering
	jQuery(divId).css({
		"position": "absolute",
		"top": top,
		"left": windowWidth/2-popupWidth/2
	});
	//only need force for IE6
	
	jQuery("#backgroundPopup").css({
		"height": windowHeight,
		"width": windowWidth
	});
	
}

try{
jQuery(document).ready(function(){
	
	//LOADING POPUP
	jQuery("#mySavedSearchesHref").click(function(){
		//centering with css
		centerPopup("#MyAccountSignIn");
		//load popup
		loadPopup("#MyAccountSignIn");
		
		currentEnableDiv = "#MyAccountSignIn";
		
	});
	
		//LOADING POPUP 
	jQuery("#mySavedSearchesHref1").click(function(){
		//centering with css
		centerPopup("#MyAccountSignIn");
		//load popup
		loadPopup("#MyAccountSignIn");
		currentEnableDiv = "#MyAccountSignIn";
	});
	
	jQuery(".starAnchor").click(function(){
		//centering with css
		centerPopup("#MyAccountSignIn");
		//load popup
		loadPopup("#MyAccountSignIn");
		currentEnableDiv = "#MyAccountSignIn";
	});
	
	
	//LOADING POPUP
	jQuery("#mySavedSearches").click(function(){
		//centering with css
		centerPopup("#AddToMySavedSearches");
		//load popup
		loadPopup("#AddToMySavedSearches");
		currentEnableDiv = "#AddToMySavedSearches";
	});
	
		//LOADING POPUP
	jQuery("#mySavedSearches1").click(function(){
		//centering with css
		centerPopup("#AddToMySavedSearches");
		//load popup
		loadPopup("#AddToMySavedSearches");
		currentEnableDiv = "#AddToMySavedSearches";
	});
	
	
	jQuery("#ForgotPassword").click(function(){
		//centering with css
		try{
		document.getElementById("MyAccountSignIn").style.display = "none";
		}catch(err){}
		centerPopup("#MyAccountForgotPassword");
		//load popup
		popupStatus = 0;
		loadPopup("#MyAccountForgotPassword");
		currentEnableDiv = "#MyAccountForgotPassword";
	});
	
		jQuery("#ForgotPasswordMain").click(function(){
		//centering with css
		try{
		document.getElementById("MyAccountSignIn").style.display = "none";
		}catch(err){}
		centerPopup("#MyAccountForgotPassword");
		//load popup
		popupStatus = 0;
		loadPopup("#MyAccountForgotPassword");
		currentEnableDiv = "#MyAccountForgotPassword";
	});
		jQuery("#signUp").click(function(){
		//centering with css
		    try{
		    document.getElementById("MyAccountSignIn").style.display = "none";
		    }catch(err){}
		    centerPopup("#MyAccountSignUp");
		//load popup
		    popupStatus = 0;
		    loadPopup("#MyAccountSignUp");
		    currentEnableDiv = "#MyAccountSignUp";
		    if(jQuery("#MyAccountSignUpIFrame").attr("src").toLowerCase().indexOf('myaccount') < 1){
		        var bs = "/myaccount/myaccusersignup.aspx?country="+ (jQuery("#MyAccountSignUp").attr("title"));
		        jQuery("#MyAccountSignUpIFrame").attr("src",bs); 
	        }
	     });
	
		jQuery("#signUpMain").click(function(){
		//centering with css
		try{
		document.getElementById("MyAccountSignIn").style.display = "none";
		}catch(err){}
		centerPopup("#MyAccountSignUp");
		//load popup
		popupStatus = 0;
		loadPopup("#MyAccountSignUp");
		currentEnableDiv = "#MyAccountSignUp";
		
		if(jQuery("#MyAccountSignUpIFrame").attr("src").toLowerCase().indexOf('myaccount') < 1){
		    var bs = "/myaccount/myaccusersignup.aspx?country="+ (jQuery("#MyAccountSignUp").attr("title"));
		    jQuery("#MyAccountSignUpIFrame").attr("src",bs); 
		}
		
	});
	
	
	
	//CLOSING POPUP
	//Click the x event!
	jQuery("#MyAccountSignInClose").click(function(){
		if(document.getElementById("MyAccountSignIn").style.display == "block")
		{
		    disablePopup("#MyAccountSignIn");
		    currentEnableDiv = "";
		}
	});
	jQuery("#MyAccountForgotPasswordClose").click(function(){
		if(document.getElementById("MyAccountForgotPassword").style.display == "block")
		{
		    disablePopup("#MyAccountForgotPassword");
		    currentEnableDiv = "";
		}
	});
	jQuery("#MyAccountSignUpClose").click(function(){
		if(document.getElementById("MyAccountSignUp").style.display == "block")
		{
		    disablePopup("#MyAccountSignUp");
		    currentEnableDiv = "";
		}
	});
	jQuery("#AddToMySavedSearchesClose").click(function(){
	    if(document.getElementById("AddToMySavedSearches").style.display == "block")
	    {
	        disablePopup("#AddToMySavedSearches");
	        currentEnableDiv = "";
	    }
	});
	//Click out event!
	jQuery("#backgroundPopup").click(function(){
		    disablePopup(currentEnableDiv);
	});
	//Press Escape event!
	jQuery(document).keypress(function(e){
		if(e.keyCode==27 && popupStatus==1){
		    disablePopup(currentEnableDiv);
		}
	});

});

}
catch(err){}
// JScript File
 var time = 0;
 function findPosX(obj)
  {
    var curleft = 0;
    if(obj.offsetParent)
        while(1) 
        {
          curleft += obj.offsetLeft;
          if(!obj.offsetParent)
            break;
          obj = obj.offsetParent;
        }
    else if(obj.x)
        curleft += obj.x;
    return curleft;
  }

  function findPosY(obj)
  {
    var curtop = 0;
    if(obj.offsetParent)
        while(1)
        {
          curtop += obj.offsetTop;
          if(!obj.offsetParent)
            break;
          obj = obj.offsetParent;
        }
    else if(obj.y)
        curtop += obj.y;
    return curtop;
  }
  
function showDiv(divid, obj){
 var yPosition = findPosY(obj);
 var xPosition = findPosX(obj);
 var div = document.getElementById(divid);
 if(div.style.display == "none"){
     div.style.left = (xPosition+40)+"px";
     div.style.top = yPosition+10 + "px";
	 div.style.display = "block";//new Effect.Appear(divid, {duration: 0.5}); //
	 
	 return;
  }
 else{
     div.style.display = "none";
 }
}

function showDivOn(divid, position, xoffset, yoffset, obj){
 var yPosition = findPosY(obj);
 var xPosition = findPosX(obj);
 var div = document.getElementById(divid);
 
 var elementWidth = div.style.width.substring(0,div.style.width.indexOf('px'));
 div.autoHide = true;
 if(div.style.display == "none")
 {
	 div.style.display = "block"; 
	 var dt = new  Date();
	 time =  dt.getTime();
	 if(divid == "areaConverter" || divid == "currencyConverter")
	 {
        setTimeout("MakeDivHidden('"+div.id+"')",900);   
     }
 }//new Effect.Appear(divid, {duration: 0.5});
 else{
     div.style.display = "none";//new  Effect.SwitchOff(divid);
     return;
 }
     
 if(position == "left")
    div.style.left = ((xPosition-elementWidth)-xoffset)+"px";
 if(position == "right")
    div.style.left = (xPosition+xoffset)+"px";
    
 div.style.top = yPosition+yoffset + "px";
 
}
function hideDiv(obj,boo)
{
    //sarfaraz Feb 14 to hide dives on mouseOut Stuff - 4 Currency & Area Conversion
	var myObj = document.getElementById(obj);
	myObj.autoHide = false;
	if(boo=="true")
	    myObj.style.display = "none";
	else
	    myObj.style.display = "block";
	
}
function doHide(obj,val)
{
        var myObj = obj.parentNode;
        
        var dt = new  Date();
        time = dt.getTime( );
        if(val=="true")
        {
            myObj.autoHide = true;
            setTimeout("MakeDivHidden('"+myObj.id+"')",900);   
        }
        else
        {
            myObj.autoHide = false;
            if(myObj.style.display == "none")
            {
                myObj.style.display == "block";
            }
        }
}
function MakeDivHidden(obj)
{
    var myobj  = document.getElementById(obj);
    var dt = new  Date();
    var newtime = dt.getTime();
    var temp =  newtime - time;
    if(myobj.autoHide && temp > 900)
    { 
        myobj.style.display = "none";
     }
}

var maxYsize = 400;
var maxXsize = 350;
var minYsize = 200;
var minXsize = 150;

// JScript File
var thisfromId="";
var loadingObj = document.getElementById('fa');
function validateSignIn(formId,url)
{
 
  var theForm = document.getElementById(formId);
  var txtEmail = theForm.elements["txtSignInEmail"];
  var txtPassword = theForm.elements["txtSignInPassword"];
  var chkRemeber = "false";
  if(theForm.elements["txtSignInPassword"].checked)
        chkRemeber = "true";
  var act = theForm.elements["act"].value;
  thisfromId = formId;
  if(validateStuff(txtEmail,txtPassword))
    {
        var type = "MyAccountAuthentication";
        CreateXmlHttpRequest();
        var mydate = new Date();
        var xmlString = "<Save>\n"+
         "<Control act=\""+escape(act)+"\" \n"+
                   "Id=\""+txtEmail.value+"\" \n"+
                   "Pwd=\""+txtPassword.value+"\" >\n"+
                   "RememberMe=\""+chkRemeber+"\" >\n"+
                   "</Control>\n"+
                   "</Save>";        
        request.onreadystatechange = Authenticate;
        request.open("POST", url, true);
        request.setRequestHeader("Content-Type", "text/xml");
        chkClass(theForm);
       // loadingObj.style.display = "block";
        request.send(xmlString);        
        

     }
}
function chkClass(node)
{
                var finalObj = null;
                try
                {
                    if(node.className == 'munnakaka')
                    {
                        loadingObj =  node;
                        return;
                    }
                    else if (node.childNodes.length > 0)
                    {
                        for(var j = 0; j < node.childNodes.length;j++)
                        {
                            chkClass(node.childNodes[j]);
                        }                        
                    }
                }
                catch(e)
                {
                    
                }
                 
}
function Authenticate()
{
    var  theForm = document.getElementById(thisfromId);
     if(request.readyState == 4)
     {
        if(request.status == 200)
        {
            var statusDiv = theForm.elements["statusDiv"];
            //loadingObj.style.display = "none";
            if(request.responseText!="")
            {
               
                var response = request.responseText;
                if(response == "0" && thisfromId!='SignInForm-master')
                {
                   document.getElementById('divFailedAuthentcation').style.display = "block";
                    
                }
                else if(response == "0" && thisfromId== 'SignInForm-master')
                {
                    //alert("Your user name and password does not match");
                    alert("Your username and password do not match. Click 'Forgot Password?' if you wish to reset your password.")
                    
                }
                 else if(response == "2" && thisfromId== 'SignInForm-master')
                {
                    alert("Your account is not activated kindly check your email to activate your account");
                    
                }
                 else if(response == "2" && thisfromId != 'SignInForm-master')
                {
                    alert("Your account is not activated kindly check your email to activate your account");
                    
                }
                else if(response == "1")
                {
                
                    theForm.setAttribute("method","POST");
                    theForm.setAttribute("action","/MyAccount/formPost.aspx?act="+theForm.elements["act"].value);
                    theForm.attributes["action"].value = "/MyAccount/formPost.aspx?act="+theForm.elements["act"].value;
                    theForm.attributes["onsubmit"].value = "return true;";
                    theForm.submit();                
                }
                
            }
        }
     }
}
function validateStuff(txtEmail,txtPassword)
{

    if(txtEmail.value == "" || txtEmail.value == "Your Email" )
    {
         alert("Please enter a valid email address");
         return false;
    }
    else if(txtPassword.value == "" || txtPassword.value == "Your Password")
    {
        alert("Please provide password ");
        return false;
    }
    
    var filter  = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
    if(!filter.test(txtEmail.value))
    {
        alert("Please provide email address in the format smith@sxbh.com or smith@sxbh.net");
        txtEmail.focus();
        return false;
    }
    
    /*if((txtPassword.value != ""))
    {
        var matchList = "";    
        var regexp = /[A-Z]/g; 
        var text = txtPassword.value;
        var flagtemp;
        while ((match = regexp.exec(text)) != null) {
        flagtemp = true;
         }
         if(flagtemp == true)
         {
            alert("This password is an Incorrect. Please retype your password. Letters must be typed using lower case.");
            return false;
         }
        else{
            return true;
            }
    }*/
 
    return true;
}
function doDisable(boo)
{
    
}
function EmptyMyAccountMaster(obj,frm)
{
    if(obj.id == "txtSignInEmail")
    {
        if(obj.value == "Your Email")
        {
            obj.value = '';
           
        }
        else if(obj.value == '')
        {
            obj.value = 'Your Email';
    
        }
    }
    else if(obj.id == "htxtSignInPassword")
    {
    
      frm.elements["htxtSignInPassword"].style.display = 'none';
      frm.elements["txtSignInPassword"].style.display = 'block';
      frm.elements["txtSignInPassword"].focus();
//         if(frm.elements["txtSignInPassword"].value == '')
//         {
//            frm.elements["htxtSignInPassword"].style.display = 'block';
//            frm.elements["txtSignInPassword"].style.display = 'none';
//         }
//         else  if(frm.elements["txtSignInPassword"].value != '')
//         {
//            frm.elements["htxtSignInPassword"].style.display = 'none';
//            frm.elements["txtSignInPassword"].style.display = 'block';
//         }
    }
    else  if(obj.id == "txtSignInPassword")
    {
       if(obj.value == '')
       {
            frm.elements["htxtSignInPassword"].style.display = 'block';
            frm.elements["txtSignInPassword"].style.display = 'none';
       }
    }
    
}

try{
(function(jQuery){jQuery.fn.bgIframe=jQuery.fn.bgiframe=function(s){if(jQuery.browser.msie&&/6.0/.test(navigator.userAgent)){s=jQuery.extend({top:'auto',left:'auto',width:'auto',height:'auto',opacity:true,src:'javascript:false;'},s||{});var prop=function(n){return n&&n.constructor==Number?n+'px':n;},html='<iframe class="bgiframe"frameborder="0"tabindex="-1"src="'+s.src+'"'+'style="display:block;position:absolute;z-index:-1;'+(s.opacity!==false?'filter:Alpha(Opacity=\'0\');':'')+'top:'+(s.top=='auto'?'expression(((parseInt(this.parentNode.currentStyle.borderTopWidth)||0)*-1)+\'px\')':prop(s.top))+';'+'left:'+(s.left=='auto'?'expression(((parseInt(this.parentNode.currentStyle.borderLeftWidth)||0)*-1)+\'px\')':prop(s.left))+';'+'width:'+(s.width=='auto'?'expression(this.parentNode.offsetWidth+\'px\')':prop(s.width))+';'+'height:'+(s.height=='auto'?'expression(this.parentNode.offsetHeight+\'px\')':prop(s.height))+';'+'"/>';return this.each(function(){if(jQuery('> iframe.bgiframe',this).length==0)this.insertBefore(document.createElement("html"),this.firstChild);});}return this;};})(jQuery);
}catch(err){}
if(typeof deconcept=="undefined")var deconcept={};if(typeof deconcept.util=="undefined")deconcept.util={};if(typeof deconcept.SWFObjectUtil=="undefined")deconcept.SWFObjectUtil={}; deconcept.SWFObject=function(a,b,c,d,e,f,g,h,i,j){if(document.getElementById){this.DETECT_KEY=j?j:"detectflash";this.skipDetect=deconcept.util.getRequestParameter(this.DETECT_KEY);this.params={};this.variables={};this.attributes=[];a&&this.setAttribute("swf",a);b&&this.setAttribute("id",b);c&&this.setAttribute("width",c);d&&this.setAttribute("height",d);e&&this.setAttribute("version",new deconcept.PlayerVersion(e.toString().split(".")));this.installedVer=deconcept.SWFObjectUtil.getPlayerVersion(); if(!window.opera&&document.all&&this.installedVer.major>7)if(!deconcept.unloadSet){deconcept.SWFObjectUtil.prepUnload=function(){__flash_unloadHandler=function(){};__flash_savedUnloadHandler=function(){};window.attachEvent("onunload",deconcept.SWFObjectUtil.cleanupSWFs)};window.attachEvent("onbeforeunload",deconcept.SWFObjectUtil.prepUnload);deconcept.unloadSet=true}f&&this.addParam("bgcolor",f);this.addParam("quality",g?g:"high");this.setAttribute("useExpressInstall",false);this.setAttribute("doExpressInstall", false);this.setAttribute("xiRedirectUrl",h?h:window.location);this.setAttribute("redirectUrl","");i&&this.setAttribute("redirectUrl",i)}}; deconcept.SWFObject.prototype={useExpressInstall:function(a){this.xiSWFPath=!a?"expressinstall.swf":a;this.setAttribute("useExpressInstall",true)},setAttribute:function(a,b){this.attributes[a]=b},getAttribute:function(a){return this.attributes[a]||""},addParam:function(a,b){this.params[a]=b},getParams:function(){return this.params},addVariable:function(a,b){this.variables[a]=b},getVariable:function(a){return this.variables[a]||""},getVariables:function(){return this.variables},getVariablePairs:function(){var a= [],b,c=this.getVariables();for(b in c)a[a.length]=b+"="+c[b];return a},getSWFHTML:function(){var a="";if(navigator.plugins&&navigator.mimeTypes&&navigator.mimeTypes.length){if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","PlugIn");this.setAttribute("swf",this.xiSWFPath)}a='<embed type="application/x-shockwave-flash" src="'+this.getAttribute("swf")+'" width="'+this.getAttribute("width")+'" height="'+this.getAttribute("height")+'" style="'+(this.getAttribute("style")||"")+ '"';a+=' id="'+this.getAttribute("id")+'" name="'+this.getAttribute("id")+'" ';var b=this.getParams();for(var c in b)a+=[c]+'="'+b[c]+'" ';b=this.getVariablePairs().join("&");if(b.length>0)a+='flashvars="'+b+'"';a+="/>"}else{if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","ActiveX");this.setAttribute("swf",this.xiSWFPath)}a='<object id="'+this.getAttribute("id")+'" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="'+this.getAttribute("width")+'" height="'+this.getAttribute("height")+ '" style="'+(this.getAttribute("style")||"")+'">';a+='<param name="movie" value="'+this.getAttribute("swf")+'" />';b=this.getParams();for(c in b)a+='<param name="'+c+'" value="'+b[c]+'" />';b=this.getVariablePairs().join("&");if(b.length>0)a+='<param name="flashvars" value="'+b+'" />';a+="</object>"}return a},write:function(a){if(this.getAttribute("useExpressInstall"))if(this.installedVer.versionIsValid(new deconcept.PlayerVersion([6,0,65]))&&!this.installedVer.versionIsValid(this.getAttribute("version"))){this.setAttribute("doExpressInstall", true);this.addVariable("MMredirectURL",escape(this.getAttribute("xiRedirectUrl")));document.title=document.title.slice(0,47)+" - Flash Player Installation";this.addVariable("MMdoctitle",document.title)}if(this.skipDetect||this.getAttribute("doExpressInstall")||this.installedVer.versionIsValid(this.getAttribute("version"))){(typeof a=="string"?document.getElementById(a):a).innerHTML=this.getSWFHTML();return true}else this.getAttribute("redirectUrl")!=""&&document.location.replace(this.getAttribute("redirectUrl")); return false}}; deconcept.SWFObjectUtil.getPlayerVersion=function(){var a=new deconcept.PlayerVersion([0,0,0]);if(navigator.plugins&&navigator.mimeTypes.length){var b=navigator.plugins["Shockwave Flash"];if(b&&b.description)a=new deconcept.PlayerVersion(b.description.replace(/([a-zA-Z]|\s)+/,"").replace(/(\s+r|\s+b[0-9]+)/,".").split("."))}else if(navigator.userAgent&&navigator.userAgent.indexOf("Windows CE")>=0){b=1;for(var c=3;b;)try{c++;b=new ActiveXObject("ShockwaveFlash.ShockwaveFlash."+c);a=new deconcept.PlayerVersion([c, 0,0])}catch(d){b=null}}else{try{b=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7")}catch(e){try{b=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");a=new deconcept.PlayerVersion([6,0,21]);b.AllowScriptAccess="always"}catch(f){if(a.major==6)return a}try{b=new ActiveXObject("ShockwaveFlash.ShockwaveFlash")}catch(g){}}if(b!=null)a=new deconcept.PlayerVersion(b.GetVariable("$version").split(" ")[1].split(","))}return a}; deconcept.PlayerVersion=function(a){this.major=a[0]!=null?parseInt(a[0]):0;this.minor=a[1]!=null?parseInt(a[1]):0;this.rev=a[2]!=null?parseInt(a[2]):0};deconcept.PlayerVersion.prototype.versionIsValid=function(a){if(this.major<a.major)return false;if(this.major>a.major)return true;if(this.minor<a.minor)return false;if(this.minor>a.minor)return true;if(this.rev<a.rev)return false;return true}; deconcept.util={getRequestParameter:function(a){var b=document.location.search||document.location.hash;if(a==null)return b;if(b){b=b.substring(1).split("&");for(var c=0;c<b.length;c++)if(b[c].substring(0,b[c].indexOf("="))==a)return b[c].substring(b[c].indexOf("=")+1)}return""}};deconcept.SWFObjectUtil.cleanupSWFs=function(){for(var a=document.getElementsByTagName("OBJECT"),b=a.length-1;b>=0;b--){a[b].style.display="none";for(var c in a[b])if(typeof a[b][c]=="function")a[b][c]=function(){}}}; if(!document.getElementById&&document.all)document.getElementById=function(a){return document.all[a]};var getQueryParamValue=deconcept.util.getRequestParameter,FlashObject=deconcept.SWFObject,SWFObject=deconcept.SWFObject;
var request = false;
 
    try {
     request = new XMLHttpRequest();
   } catch (trymicrosoft) {
     try {
       request = new ActiveXObject("Msxml2.XMLHTTP");
     } catch (othermicrosoft) {
       try {
         request = new ActiveXObject("Microsoft.XMLHTTP");
       } catch (failed) {
         request = false;
       }  
     }
   }

   if (!request)
     alert("Error initializing XMLHttpRequest!");
function CreateXmlHttpRequest(){
 try {
     myrequest = new XMLHttpRequest();
   } catch (trymicrosoft) {
     try {
       myrequest = new ActiveXObject("Msxml2.XMLHTTP");
     } catch (othermicrosoft) {
       try {
         myrequest = new ActiveXObject("Microsoft.XMLHTTP");
       } catch (failed) {
         myrequest = false;
       }  
     }
   }

   if (!myrequest )
     alert("Error initializing XMLHttpRequest!");
     
   request = myrequest ;
}
var datePickerDivID="datepicker",iFrameDivID="datepickeriframe",dayArrayShort=new Array("Su","Mo","Tu","We","Th","Fr","Sa"),dayArrayMed=new Array("Sun","Mon","Tue","Wed","Thu","Fri","Sat"),dayArrayLong=new Array("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"),monthArrayShort=new Array("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"),monthArrayMed=new Array("Jan","Feb","Mar","Apr","May","June","July","Aug","Sept","Oct","Nov","Dec"),monthArrayLong=new Array("January", "February","March","April","May","June","July","August","September","October","November","December"),defaultDateSeparator="-",defaultDateFormat="dmy",dateSeparator=defaultDateSeparator,dateFormat=defaultDateFormat; function displayDatePicker(b,a,c,e){b=document.getElementsByName(b).item(0);a=document.getElementById("dateFrom");dateSeparator=e?e:defaultDateSeparator;dateFormat=c?c:defaultDateFormat;c=a.offsetLeft;e=a.offsetTop+a.offsetHeight;for(a=a;a.offsetParent;){a=a.offsetParent;c+=a.offsetLeft;e+=a.offsetTop}drawDatePicker(b,c+15,e-80)} function drawDatePicker(b,a,c){var e=getFieldDate(b.value);if(!document.getElementById(datePickerDivID)){var d=document.createElement("div");d.setAttribute("id",datePickerDivID);d.setAttribute("class","dpDiv");d.setAttribute("style","visibility: hidden;");document.body.appendChild(d)}d=document.getElementById(datePickerDivID);d.style.position="absolute";d.style.left=a+"px";d.style.top=c+"px";d.style.visibility=d.style.visibility=="visible"?"hidden":"visible";d.style.zIndex=1E4;refreshDatePicker(b.name, e.getFullYear(),e.getMonth(),e.getDate())} function refreshDatePicker(b,a,c,e){var d=new Date;if(c>=0&&a>0)d=new Date(a,c,1);else{e=d.getDate();d.setDate(1)}a="<table cols=7 class='dpTable'>\r\n";a+="<tr class='dpTitleTR'>";a+="<td class='dpButtonTD'>"+getButtonCode(b,d,-1,"<img src='/images/prevc.gif' alt='Previous Month' title='Next Month'/>")+"</td>\r\n";a+="<td colspan=5 class='dpTitleTD'><div class='dpTitleText'>"+monthArrayLong[d.getMonth()]+" "+d.getFullYear()+"</div></td>\r\n";a+="<td class='dpButtonTD'>"+getButtonCode(b,d,1,"<img src='/images/nextc.gif' alt='Next Month' title='Next Month'/>")+ "</td>\r\n";a+="</tr>\r\n";a+="<tr class='dpDayTR'>";for(i=0;i<dayArrayShort.length;i++)a+="<td class='dpDayTD'>"+dayArrayShort[i]+"</td>\r\n";a+="</tr>\r\n";a+="<tr class='dpTR'>";for(i=0;i<d.getDay();i++)a+="<td class='dpTD'&nbsp;</td>\r\n";do{dayNum=d.getDate();TD_onclick=" onclick=\"updateDateField('"+b+"', '"+getDateString(d)+"');\">";a+=dayNum==e?"<td class='dpDayHighlightTD'"+TD_onclick+"<div class='dpDayHighlight'>"+dayNum+"</div></td>\r\n":"<td class='dpTD'"+TD_onclick+dayNum+"</td>\r\n"; if(d.getDay()==6)a+="</tr>\r\n<tr class='dpTR'>";d.setDate(d.getDate()+1)}while(d.getDate()>1);if(d.getDay()>0)for(i=6;i>d.getDay();i--)a+="<td class='dpTD'&nbsp;</td>\r\n";a+="</tr>\r\n";e=new Date;e="Today is "+dayArrayMed[e.getDay()]+", "+monthArrayMed[e.getMonth()]+" "+e.getDate();a+="<tr class='dpTodayButtonTR'><td colspan=7 class='dpTodayButtonTD'>";a+="<div class='dpTodayButton' style='float:left;'><a href='javascript:void(0);' onmousedown='refreshDatePicker(\""+b+'");\' title="Select Today\'s Date">Today</a></div> '; a+="<div class='dpTodayButton' style='float:right;'><a href='javascript:void(0);' onmousedown='updateDateField(\""+b+"\");' title='Close this calender'>Close</a></div>";a+="</td>\r\n</tr>\r\n";a+="</table>\r\n";document.getElementById(datePickerDivID).innerHTML=a;adjustiFrame()} function getButtonCode(b,a,c,e){var d=(a.getMonth()+c)%12;a=a.getFullYear()+parseInt((a.getMonth()+c)/12);if(d<0){d+=12;a+=-1}return"<button class='dpButton' onClick='refreshDatePicker(\""+b+'", '+a+", "+d+");'>"+e+"</button>"} function getDateString(b){var a="00"+b.getDate(),c="00"+(b.getMonth()+1);a=a.substring(a.length-2);c=c.substring(c.length-2);switch(dateFormat){case "dmy":return a+dateSeparator+c+dateSeparator+b.getFullYear();case "ymd":return b.getFullYear()+dateSeparator+c+dateSeparator+a;case "mdy":default:return c+dateSeparator+a+dateSeparator+b.getFullYear()}} function getFieldDate(b){var a,c,e,d,f;try{if(c=splitDateString(b)){switch(dateFormat){case "dmy":e=parseInt(c[0],10);d=parseInt(c[1],10)-1;f=parseInt(c[2],10);break;case "ymd":e=parseInt(c[2],10);d=parseInt(c[1],10)-1;f=parseInt(c[0],10);break;case "mdy":default:e=parseInt(c[1],10);d=parseInt(c[0],10)-1;f=parseInt(c[2],10);break}a=new Date(f,d,e)}else a=new Date(b)}catch(g){a=new Date}return a} function splitDateString(b){return b.indexOf("/")>=0?b.split("/"):b.indexOf(".")>=0?b.split("."):b.indexOf("-")>=0?b.split("-"):b.indexOf("\\")>=0?b.split("\\"):false} function updateDateField(b,a){var c=document.getElementsByName(b).item(0);if(a)c.value=a;document.getElementById(datePickerDivID).style.visibility="hidden";adjustiFrame();b=="txtFromDate"&&document.getElementById("txttoDate").value==""&&document.getElementById("txttoDate").focus();a&&typeof datePickerClosed=="function"&&datePickerClosed(c)} function adjustiFrame(b,a){if(!document.getElementById(iFrameDivID)){var c=document.createElement("iFrame");c.setAttribute("id",iFrameDivID);c.setAttribute("src","javascript:false;");c.setAttribute("scrolling","no");c.setAttribute("frameborder","0");document.body.appendChild(c)}b||(b=document.getElementById(datePickerDivID));a||(a=document.getElementById(iFrameDivID));try{a.style.position="absolute";a.style.width=b.offsetWidth;a.style.height=b.offsetHeight;a.style.top=b.style.top;a.style.left=b.style.left; a.style.zIndex=b.style.zIndex-1;a.style.visibility=b.style.visibility}catch(e){}};
