﻿
	
	var trailimage=["spacer.gif", 300, 100] //image path, plus width and height
	var offsetfrommouse=[10,-20] //image x,y offsets from cursor position in pixels. Enter 0,0 for no offset
	var displayduration=0 //duration in seconds image should remain visible. 0 for always.
	var divw=0;
	var divh=0;

	if (document.getElementById || document.all)
	{	
		document.write('<div id="trailimageid" style="position:absolute;visibility:hidden;left:-500px;top:-500px; z-index:99999;"><\/div>')
		document.onmousemove=followmouse
	}
	function settrail(obj1,obj2)
	{
		var strdisplay ="";
		var wd;
		var ht;
		var WdPWise=25;
		var HtPWise=130;
		if (("Design Services"=="Application Development")||("Design Services"=="Web Development")||("Design Services"=="Flash Animation"))
		{
			wd=350;
			ht=200;
		}
		else if(("Design Services"=="Character Design"))
		{
			wd=300;
			ht=240;
			
		}
		else if(("Design Services"=="Cartoon Characters"))
		{
			wd=300;
			ht=240;
			WdPWise=75;
			HtPWise=125;
			
		}
		else if(("Design Services"=="Illustrative Images"))
		{
			wd=400;
			ht=200;
		}
		
		else if(("Design Services"=="Print "))
		{
			wd=280;
			ht=248;
			WdPWise=75;
			HtPWise=125;

		}
		
		else
		{
			wd=240;
			ht=190;
		}
			//alert(obj2);
			strdisplay = "<table bgcolor='#EDEDED' cellpadding='4' cellspacing='0' bordercolordark='#C9C9C9' style='width:"+wd+"px;height:"+ht+"px;background-color:#ffffff;border:10px solid #C9C9C9;' summary=''>";
			strdisplay+="<tr>";
			strdisplay+="<td valign='top'>";
				strdisplay += "<table border='0px' cellpadding='0' cellspacing='0' summary='0'style='width:100%; height:"+ht+"px;' align='center' class='maintext'>";
				strdisplay += "<tr><td align='center' valign='top'>";
				if("Design Services"=="Flash Animation")
				{
					strdisplay +="<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0' width='350' height='200'>";
					  strdisplay +="<param name='movie' value='"+obj1+"'>";
					 strdisplay +=" <param name='quality' value='high'>";
					  strdisplay +="<embed src='"+obj1+"' quality='high' pluginspage='http://www.macromedia.com/go/getflashplayer' type='application/x-shockwave-flash' width='350' height='250'><\/embed>";
					strdisplay +="<\/object>";
					
				}
				else
				{
					strdisplay +="<img src='"+obj1+"' align='center' alt=''>";
					
				}
				
				strdisplay +="<\/td><\/tr>" ;
				strdisplay += "<\/table>";//main table
			strdisplay += "<\/td>";//outer table
			strdisplay += "<\/tr>";//outer table
			//strdisplay += "<tr><td height='20px' bgcolor='#A5E07E' class='Webheading' align='left'><b>"+obj2+"<\/b><\/td><\/tr>";
			strdisplay+="<tr height='20px' bgcolor='#C9C9C9' valign='top' class='footerclass'><td width='"+wd+"px'>ROFF LTD.<\/td><\/tr>";
			strdisplay += "<\/table>";//outer table
		
		document.getElementById("trailimageid").innerHTML = strdisplay;
		divw = parseInt(wd)+parseInt(WdPWise);
		divh = parseInt(ht)+parseInt(HtPWise);
		showtrail();
	}
	function gettrailobj()
	{
	if (document.getElementById)
	return document.getElementById("trailimageid").style
	else if (document.all)
	return document.all.trailimagid.style
	}

	function truebody(){
	return (!window.opera && document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
	}

	function showtrail()
	{
		document.onmousemove=followmouse
		//follow mouse to show div first time...
		gettrailobj().visibility="visible"
	}

	function hidetrail(){
	document.getElementById("trailimageid").innerHTML = "";
	gettrailobj().visibility="hidden"
	document.onmousemove=followmouse

	}

function followmouse(e)
	{
	var docwidth=document.all? truebody().scrollLeft+truebody().clientWidth : pageXOffset+window.innerWidth-15
	var docheight=document.all? Math.min(truebody().scrollHeight, truebody().clientHeight) : Math.min(document.body.offsetHeight, window.innerHeight)
if(typeof e != "undefined")
	{
	if(docwidth < 15+e.pageX+divw)
		xcoord = e.pageX-divw-5;
	else
		xcoord = 15+e.pageX;
	if(docheight < 15+e.pageY+divh)
		ycoord = 15+e.pageY-Math.max(0,(divh + e.pageY - docheight - truebody().scrollTop - 30));
	else
		ycoord = 15+e.pageY;
	}
else if (typeof window.event != "undefined")
	{

	if(docwidth < 15+truebody().scrollLeft+event.clientX+divw)
		xcoord = truebody().scrollLeft-5+event.clientX-divw;
	else
		xcoord = truebody().scrollLeft+15+event.clientX;

	if(docheight < 15+truebody().scrollTop+event.clientY+divh)
		ycoord = 15+truebody().scrollTop+event.clientY-Math.max(0,(divh + event.clientY - docheight - 30));
	else
		ycoord = truebody().scrollTop+15+event.clientY;
	}
	
	gettrailobj().left=xcoord+"px"
	gettrailobj().top=ycoord+"px"
	}
	document.onmousemove=followmouse

	if (displayduration>0)
		setTimeout("hidetrail()", displayduration*1000)
		



function show3()
{

	setOpacity(0);
	document.getElementById('pccont2').style.zindex='2';
	document.getElementById('pccont').style.zindex='0';
	document.getElementById('pccont1').style.zindex='0';
	document.getElementById('pccont2').style.visibility='visible';
	document.getElementById('pccont2').style.display='block';
	document.getElementById('pccont1').style.visibility='hidden';
	document.getElementById('pccont1').style.display='none';
	document.getElementById('pccont').style.visibility='hidden';
	document.getElementById('pccont').style.display='none';
	fadeInMyPopup();
}
function setOpacity( value ) {
	document.getElementById("pccont2").style.opacity = value / 10;
	document.getElementById("pccont2").style.filter = 'alpha(opacity=' + value *10 + ')';
	document.getElementById("pccont").style.opacity = value / 10;
	document.getElementById("pccont").style.filter = 'alpha(opacity=' + value * 10+ ')';
	document.getElementById("pccont1").style.opacity = value / 10;
	document.getElementById("pccont1").style.filter = 'alpha(opacity=' + value * 10 + ')';

}
function fadeOutMyPopup(id) {
	for( var i = 0 ; i <= 100 ; i++ ) {
		setTimeout( 'setOpacity(' + (10 - i / 10) + ')' , 8 * i );
	}

	//setTimeout('closeMyPopup()', 800 );
}

function fadeInMyPopup(Id) {
	for( var i = 0 ; i <= 100 ; i++ )
		setTimeout( 'setOpacity(' + (i / 10) + ')' , 8 * i );
}
function show()
{

	setOpacity(0);
	document.getElementById('pccont').style.zindex='2';
	document.getElementById('pccont1').style.zindex='0';
	document.getElementById('pccont2').style.zindex='0';
	document.getElementById('pccont').style.visibility='hidden';
	document.getElementById('pccont').style.display='none';
	document.getElementById('pccont1').style.visibility='hidden';
	document.getElementById('pccont1').style.display='none';
	document.getElementById('pccont2').style.visibility='hidden';
	document.getElementById('pccont2').style.display='none';

	fadeInMyPopup();
}
function show1()
{

	setOpacity(0);
	document.getElementById('pccont1').style.zindex='2';
	document.getElementById('pccont').style.zindex='0';
	document.getElementById('pccont2').style.zindex='0';
	document.getElementById('pccont1').style.visibility='visible';
	document.getElementById('pccont1').style.display='block';
	document.getElementById('pccont').style.visibility='hidden';
	document.getElementById('pccont').style.display='none';
	document.getElementById('pccont2').style.visibility='hidden';
	document.getElementById('pccont2').style.display='none';

	fadeInMyPopup();
}
function hide()
{
	fadeOutMyPopup();
	setTimeout("closeit()",800);
	
}
function ShowHide(elemid)
{
	elem = document.getElementById(elemid);
	
	if(elem != null)
	{
		
		if(elem.style.borderColor == "#ffffff")
			elem.style.borderColor = "#000000";
		else
			elem.style.borderColor = "#ffffff";
	}
}

