//<!--

var siteversion;
siteversion = "ht ml";

/* ---------------------------------------------------
   Roll Overs ---------------------------------------- */


	function rollOut() {
	  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
	}
	function MM_preloadImages() {
	  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
	    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
	    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
	}
	function MM_findObj(n, d) {
	  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
	    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
	  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
	  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
	  if(!x && d.getElementById) x=d.getElementById(n); return x;
	}
	function rollOver() {
	  var i,j=0,x,a=rollOver.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
	   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
	}
	

/* ---------------------------------------------------
   Open Windows -------------------------------------- */


	function MM_openBrWindowCentrerFeatures(theURL,winName,features,w,h) {
		var top=(screen.width/2)-(w/2);
		var left=(screen.height/2)-(h/2);
		window.open(theURL,winName,features + ',left='+top+',top='+left+',width='+w+',height='+h);
	}
	

/* ---------------------------------------------------
   Form Validation ----------------------------------- */


	function checkEmail(to_check) {
		if (/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(to_check)){
		return (true)}
	}	
	function checkUsername(to_check) {
		if(to_check!=""){	
			var pattern_phone = /[^\d\s_-]/;
			if (to_check.match(pattern_phone)) {
				return false;
			}else{
				return true;
			}
		}else{
			return false;
		}
	}	
	function checkPhone(to_check) {
		if(to_check!=""){	
			var pattern_phone = /[^\d\s()# -]/;
			if (to_check.match(pattern_phone)) {
				return false;
			}else{
				return true;
			}
		}else{
			return false;
		}
	}
	
	
	
/* ---------------------------------------------------
   Get Element by ClassName -------------------------- */
		
	
	function getElementsByClassName(oElm, strTagName, oClassNames){
	    var arrElements = (strTagName == "*" && document.all)? document.all : oElm.getElementsByTagName(strTagName);
	    var arrReturnElements = new Array();
	    var arrRegExpClassNames = new Array();
	    if(typeof oClassNames == "object"){
	        for(var i=0; i<oClassNames.length; i++){
	            arrRegExpClassNames.push(new RegExp("(^|\\s)" + oClassNames[i].replace(/\-/g, "\\-") + "(\\s|$)"));
	        }
	    }
	    else{
	        arrRegExpClassNames.push(new RegExp("(^|\\s)" + oClassNames.replace(/\-/g, "\\-") + "(\\s|$)"));
	    }
	    var oElement;
	    var bMatchesAll;
	    for(var j=0; j<arrElements.length; j++){
	        oElement = arrElements[j];
	        bMatchesAll = true;
	        for(var k=0; k<arrRegExpClassNames.length; k++){
	            if(!arrRegExpClassNames[k].test(oElement.className)){
	                bMatchesAll = false;
	                break;                      
	            }
	        }
	        if(bMatchesAll){
	            arrReturnElements.push(oElement);
	        }
	    }
	    return (arrReturnElements)
	}	
	

/* ---------------------------------------------------
   Cookie Detection ---------------------------------- */
	
	
	function CookieDetect(page) {
		chkcookie = 'test';
		document.cookie = chkcookie;
		if (document.cookie.indexOf(chkcookie,0) < 0) {
		    if(page != "") {
				return true;
			}else{
				document.location.replace(page);
				return false;
			}
		}else{
		   return true;
		}
	}
	

/* ----------------------------------------------------
   Browser Detection ---------------------------------- */


	var allow_trans; allow_trans = "1";
	var platformname;
	var browserName;

	function browser_detection() {
		platformname = navigator.platform;
		browserName = whichBrs();	
		browserversion="0";

		var safari = navigator.appVersion.search(/Safari/);

		if (navigator.appVersion.indexOf("2.")!=-1) {
			browserversion="2";
		}
		if (navigator.appVersion.indexOf("3.")!=-1) {
			browserversion="3";
		}
		if (navigator.appVersion.indexOf("5.")!=-1) {
			browserversion="5";
		}
		if (navigator.appVersion.indexOf("4")!=-1) {
			browserversion="4";
			if(safari != -1) {
				browserversion="100";
			}
		}
		if (navigator.appVersion.indexOf("6.")!=-1) {
			browserversion="6";
		}
		if (navigator.appVersion.indexOf("7.")!=-1) {
			browserversion="7";
		}		
		//netsape 6 and 7 returns a 5 but 4.7 is 4.7


		if(browserName == "NS"){
			if(parseInt(browserversion) < 5){
				allow_trans = "0";
			}
		}
					
		//alert(allow_trans);	
		//alert(browserName);
		//alert(browserversion);
		//alert(platformname);
	}
	browser_detection();
	

	function whichBrs() {
		var agt=navigator.userAgent.toLowerCase();
		if (agt.indexOf("opera") != -1) return 'Opera';
		if (agt.indexOf("staroffice") != -1) return 'Star Office';
		if (agt.indexOf("beonex") != -1) return 'Beonex';
		if (agt.indexOf("chimera") != -1) return 'Chimera';
		if (agt.indexOf("netpositive") != -1) return 'NetPositive';
		if (agt.indexOf("phoenix") != -1) return 'Phoenix';
		if (agt.indexOf("firefox") != -1) return 'Firefox';
		if (agt.indexOf("safari") != -1) return 'Safari';
		if (agt.indexOf("skipstone") != -1) return 'SkipStone';
		if (agt.indexOf("msie") != -1) return 'MSIE';
		if (agt.indexOf("netscape") != -1) return 'NS';
		if (agt.indexOf("mozilla/5.0") != -1) return 'Mozilla';
		if (agt.indexOf('\/') != -1) {
		if (agt.substr(0,agt.indexOf('\/')) != 'mozilla') {
		return navigator.userAgent.substr(0,agt.indexOf('\/'));}
		else return 'Netscape';} else if (agt.indexOf(' ') != -1)
		return navigator.userAgent.substr(0,agt.indexOf(' '));
		else return navigator.userAgent;
	}
	
	

/* ---------------------------------------------------
   Center a div in the page  ------------------------- */

	
	var myWidth=0;
	var myHeight=0;
	function positionneDiv(divname,w,h){
		switch(browserName) {
			case "MSIE": ypos = document.body.scrollTop; break;
			case "NS": ypos = window.scrollY; break;
			default: ypos = document.body.scrollTop; break;
		}
		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;
		}
		document.getElementById(divname).style.top = ypos + (myHeight/2) - (h/2) + "px";
		document.getElementById(divname).style.left = (myWidth/2) - (w/2) + "px";
	}
	
	
	function getWindowDimension(){
		switch(browserName) {
			case "MSIE": ypos = document.body.scrollTop; break;
			case "NS": ypos = window.scrollY; break;
			default: ypos = document.body.scrollTop; break;
		}
		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;
		}
	}
	

/* ----------------------------------------------------
   Clean UTF ------------------------------------------ */


	function clean_utf(str) {
		replacement = new RegExp(String.fromCharCode(339),"g");
		str.value = str.value.replace(replacement,"oe");
		replacement = new RegExp(String.fromCharCode(8211),"g");
		str.value = str.value.replace(replacement,"-");
		replacement = new RegExp(String.fromCharCode(8212),"g");
		str.value = str.value.replace(replacement,"-");
		replacement = new RegExp(String.fromCharCode(8230),"g");
		str.value = str.value.replace(replacement,"...");
		replacement = new RegExp(String.fromCharCode(768),"g");
		str.value = str.value.replace(replacement,"'");
		replacement = new RegExp(String.fromCharCode(769),"g");
		str.value = str.value.replace(replacement,"'");
		replacement = new RegExp(String.fromCharCode(771),"g");
		str.value = str.value.replace(replacement,"~");
		replacement = new RegExp(String.fromCharCode(777),"g");
		str.value = str.value.replace(replacement,"'");	
		replacement = new RegExp(String.fromCharCode(803),"g");
		str.value = str.value.replace(replacement,".");
		replacement = new RegExp(String.fromCharCode(894),"g");
		str.value = str.value.replace(replacement,";");
		replacement = new RegExp(String.fromCharCode(900),"g");
		str.value = str.value.replace(replacement,"'");
		replacement = new RegExp(String.fromCharCode(171),"g");
		str.value = str.value.replace(replacement,'"');	
		replacement = new RegExp(String.fromCharCode(187),"g");
		str.value = str.value.replace(replacement,'"');
		replacement = new RegExp(String.fromCharCode(1764),"g");
		str.value = str.value.replace(replacement,'"');
		replacement = new RegExp(String.fromCharCode(1765),"g");
		str.value = str.value.replace(replacement,'"');
		replacement = new RegExp(String.fromCharCode(733),"g");
		str.value = str.value.replace(replacement,'"');	
		replacement = new RegExp(String.fromCharCode(8213),"g");
		str.value = str.value.replace(replacement,'_');
		replacement = new RegExp(String.fromCharCode(8215),"g");
		str.value = str.value.replace(replacement,'_');
		replacement = new RegExp(String.fromCharCode(8216),"g");
		str.value = str.value.replace(replacement,"'");
		replacement = new RegExp(String.fromCharCode(8217),"g");
		str.value = str.value.replace(replacement,"'");
		replacement = new RegExp(String.fromCharCode(8218),"g");
		str.value = str.value.replace(replacement,",");
		replacement = new RegExp(String.fromCharCode(8219),"g");
		str.value = str.value.replace(replacement,"'");
		replacement = new RegExp(String.fromCharCode(8220),"g");
		str.value = str.value.replace(replacement,'"');
		replacement = new RegExp(String.fromCharCode(8221),"g");
		str.value = str.value.replace(replacement,'"');
		replacement = new RegExp(String.fromCharCode(8242),"g");
		str.value = str.value.replace(replacement,"'");
		replacement = new RegExp(String.fromCharCode(8243),"g");
		str.value = str.value.replace(replacement,'"');
		replacement = new RegExp(String.fromCharCode(8722),"g");
		str.value = str.value.replace(replacement,'-');
		replacement = new RegExp(String.fromCharCode(9472),"g");
		str.value = str.value.replace(replacement,'-');
		replacement = new RegExp(String.fromCharCode(59450),"g");
		str.value = str.value.replace(replacement,'-');
		replacement = new RegExp(String.fromCharCode(61444),"g");
		str.value = str.value.replace(replacement,',');
		replacement = new RegExp(String.fromCharCode(61445),"g");
		str.value = str.value.replace(replacement,',');
		replacement = new RegExp(String.fromCharCode(61446),"g");
		str.value = str.value.replace(replacement,',');
		replacement = new RegExp(String.fromCharCode(61447),"g");
		str.value = str.value.replace(replacement,"'");
		replacement = new RegExp(String.fromCharCode(61448),"g");
		str.value = str.value.replace(replacement,"'");
		replacement = new RegExp(String.fromCharCode(61449),"g");
		str.value = str.value.replace(replacement,"'");
		replacement = new RegExp(String.fromCharCode(61455),"g");
		str.value = str.value.replace(replacement,"'");
		replacement = new RegExp(String.fromCharCode(61461),"g");
		str.value = str.value.replace(replacement,'~');
		replacement = new RegExp(String.fromCharCode(61463),"g");
		str.value = str.value.replace(replacement,'~');
		replacement = new RegExp(String.fromCharCode(61464),"g");
		str.value = str.value.replace(replacement,'~');
		replacement = new RegExp(String.fromCharCode(64465),"g");
		str.value = str.value.replace(replacement,'~');
		replacement = new RegExp(String.fromCharCode(8482),"g");
		str.value = str.value.replace(replacement,'(tm) ');
		replacement = new RegExp(String.fromCharCode(8539),"g");
		str.value = str.value.replace(replacement,'1/8');
		replacement = new RegExp(String.fromCharCode(8540),"g");
		str.value = str.value.replace(replacement,'3/8');
		replacement = new RegExp(String.fromCharCode(8541),"g");
		str.value = str.value.replace(replacement,'5/8');
		replacement = new RegExp(String.fromCharCode(8542),"g");
		str.value = str.value.replace(replacement,'7/8');
		replacement = new RegExp(String.fromCharCode(8364),"g");
		str.value = str.value.replace(replacement,' Euros');
		replacement = new RegExp(String.fromCharCode(8362),"g");
		str.value = str.value.replace(replacement,' Sheqels');
		replacement = new RegExp(String.fromCharCode(8359),"g");
		str.value = str.value.replace(replacement,' Pesetas');
		replacement = new RegExp(String.fromCharCode(8356),"g");
		str.value = str.value.replace(replacement,' Liras');
		replacement = new RegExp(String.fromCharCode(8355),"g");
		str.value = str.value.replace(replacement,' Francs');
		replacement = new RegExp(String.fromCharCode(64830),"g");
		str.value = str.value.replace(replacement,'(');
		replacement = new RegExp(String.fromCharCode(64831),"g");
		str.value = str.value.replace(replacement,')');
		
		//alert(title.charCodeAt(i) + " = " + title.charAt(i));
	}


//-->
