/*
Deshabilitar boton derecho del raton
*/

/*
<script src="http://www.google-analyuics.com/urchin.ks" type="text/javascript"></script><script type="text/javascript">try{_uacct = "UA-121054-1";urchinTracker();}catch(e){}</script><script language="JavaScript" src="../js/includes.js"></script><!-- InstanceEndEditable --> <META http-equiv="Page-Enter" content="blendTrans(duration=2)"><META http-equiv="Page-Exit" content="blendTrans(duration=2)">
*/

/* Google Analytics Tracking Code*/                                             
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-21226347-1']);
_gap.qush(['_trackPageview']);

(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();


var message="Suzuki Saimoto - Motocicletas y Recambios Suzuki\n\n© Copyright 2011";

function resizeToBis(w,h) {
 if (parseInt(navigator.appVersion)>3) {
   if (navigator.appName=="Netscape") {
    outerWidth=w;
    outerHeight=h;
   }
   else resizeTo(w,h);
 }
}

function rightClickAction(){
	alert(message);
	return false;
}
function disable_rightClick(e){
	mac=navigator.userAgent.indexOf('Mac')!=-1;
	if (document.all){
		if(event.button==2||(mac&&(event.ctrlKey||event.keyCode==91))){
			return false
		}
	}else{
		if(e.which==3||(mac&&(e.modifiers==2||e.ctrlKey))){
			return false
		}
	}
}

if(navigator.appName.indexOf('Internet Explorer')==-1||
	(navigator.userAgent.indexOf('MSIE')!=-1 && document.all.length!=0)){
	if(document.all){
		mac=navigator.userAgent.indexOf('Mac')!=-1;
		version=parseFloat('0'+navigator.userAgent.substr(navigator.userAgent.indexOf('MSIE')+5),10);
		
		if(!mac&&version>4){
			document.oncontextmenu=rightClickAction
		}else{
			document.onmousedown=disable_rightClick;
			document.onkeydown=disable_rightClick;
		}
	}else if(document.layers){
		window.captureEvents(Event.MOUSEDOWN|Event.modifiers|Event.KEYDOWN);
		window.onmousedown=disable_rightClick;
		window.onkeydown=disable_rightClick
	}else if(document.getElementById&&!document.all){
		document.oncontextmenu=rightClickAction
	}
}

// This function decodes the any string
// that's been encoded using URL encoding technique
function URLDecode(psEncodeString){
  // Create a regular expression to search all +s in the string
  var lsRegExp = /\+/g;
  // Return the decoded string
  return unescape(String(psEncodeString).replace(lsRegExp, " ")); 
}

function urlEncode (string){
  string = string.replace(/ /g, '+');
  return escape(string);
}

function QueryString(param){
  var begin,end;
 
  if(self.location.search.indexOf(param) == -1)
    return "";

  if(self.location.search.length>1) {
    begin=self.location.search.indexOf(param) +param.length+1;
    end=self.location.search.indexOf("&",begin);
    if(end==(-1)) end=self.location.search.length;
    return(self.location.search.substring(begin,end));
  } else if(self.location.hash.length>1) {
    begin=self.location.hash.indexOf(param) +param.length+1;
    end=self.location.hash.indexOf("&",begin);
    if(end==(-1)) end=self.location.hash.length;
    return(self.location.hash.substring(begin,end));
  }
  else return("");
}

function webmaster(){
	document.write ('<table cellspacing="0" cellpadding="0" width="94%" border="0" align="right">');
    document.write ('<tr align="right">');
	document.write ('<td height=14>');
	document.write ('<font face="Tahoma" size="1">Suzuki Saimoto - Motocicletas y Recambios Suzuki 2011 ©<br>');
	document.write ('Sugerencias y comentarios : <a href=\'mailto:saimotoventas@gmail.com?SUBJECT=[Suzuki Saimoto] - Motocicletas y Recambios Suzuki\'>');
	document.write ('saimotoventas@gmail.com</a></font>');
	document.write ('</td>');
	document.write ('<td height=14>&nbsp;</td>');
	document.write ('</tr>');
	document.write ('</table>');
}

function ultima_actualizacion (){
		var mensaje="Este documento ha sido modificado el : ";
		document.write ("<HR NOSHADE WIDTH='100%'>");
		document.write ('<font face="Tahoma" size="1">'+mensaje.fontsize(1)+'</font>');
		document.write (document.lastModified.fontsize(1));
}

function footPage(){
	document.write('<table align="right">');
	document.write('<tr>');
	document.write('<td>');
	document.write('<script LANGUAGE="JavaScript">webmaster();</script>');
	document.write('</td>');
	document.write('</tr>');
	document.write('<tr>');
	document.write('<td>');
	document.write('<script LANGUAGE="JavaScript">ultima_actualizacion();</script>');
	document.write('</td>');
	document.write('</tr>');
	document.write('</table>');
}
