function isTouchDevice()
{
	try
	{
		document.createEvent("TouchEvent");
		return true;
	} catch(e) {
		return false;
	}
}

function touchScroll(id)
{
	if(isTouchDevice())					//     if touch events exist...
	{ 									
		var el=document.getElementById(id);
		var scrollStartPos=0;
		document.getElementById(id).addEventListener("touchstart",  function(event) { scrollStartPos=this.scrollTop+event.touches[0].pageY; },false);
		document.getElementById(id).addEventListener("touchmove", function(event) { this.scrollTop=scrollStartPos-event.touches[0].pageY;  event.preventDefault(); },false);
	}
}

function ShowCity() 
{
    document.getElementById('SelectorCity').style.width = "142px";
    document.getElementById('SelectorCity').style.left = "7px";	   
    document.getElementById('SelectorCity').style.visibility = "visible"; 	
}	
				
function HideCity() 
{
    document.getElementById('SearchPanel').style.visibility = "hidden";
    document.getElementById('SelectorCity').style.visibility = "hidden";
}				 

function K() 
{
    document.getElementById('K').style.position = "absolute";
    document.getElementById('K').style.top = "0px";
    document.getElementById('K').style.left = "-275px";	
    document.getElementById('K').style.width = "270px";	   
    document.getElementById('K').style.visibility = "visible"; 		
}	
		 
function Search() 
{
    document.getElementById('SearchPanel').style.left = "260px";	   
    document.getElementById('SearchPanel').style.visibility = "visible"; 	
}

function Change(Level)	
{  
    if (Level == 1)
	{
	   		  this.href='http://www.freelifeclub.org/'; 
	}  
    if (Level == 2)
	{
	   		  this.href='http://www.cpminnj.org/'; 
	}  
    if (Level == 3)
	{
	   		  this.href='http://www.trovaescort.com/'; 
	}  
    if (Level == 4)
	{
	   		  this.href='http://www.sexy-guide.com/'; 
	}  
    if (Level == 5)
	{
	   		  this.href='http://www.MarcellaTopEscort.com/'; 
	} 
}
		
function startScrollingDetector ()
{	
 	setInterval("scrollingDetector()", 100);							   
}
function scrollingDetector ()
{			  								  
if (navigator.appName == "Microsoft Internet Explorer")
 	document.getElementById('Ticker').style.top=eval(document.body.scrollTop)+'px';
else
 	document.getElementById('Ticker').style.top=eval(window.pageYOffset)+'px';
}				

function ReSize() 
{
  var myWidth = 0;
  var 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;
  }
  document.getElementById('Photo').style.width=eval(myWidth); 
  document.getElementById('Photo').style.width=eval(myHeight); 
}


