var secs
var timerID = null
var timerRunning = false
var delay = 1000;
var img_index=0;
var gNewLocation;
var page_for;
var next_page;

var arr_images = new Array();
var arr_subimages1 = new Array();
var arr_subimages2 = new Array();
var arr_subimages3 = new Array();
var arr_text = new Array();
var arr_url = new Array();
var arr_images_featured=new Array();
var arr_text_featured=new Array();
var arr_url_featured=new Array();
var arr_pagination_featured=new Array();
var arr_contents;

arr_images[0]="images/atria.jpg";
arr_images[1]="images/bizbuilder.jpg";
arr_images[2]="images/bombonieres.jpg";
arr_images[3]="images/bribieIslandLife.jpg";
arr_images[4]="images/canter.jpg";
arr_images[5]="images/commercialtyre.jpg";
arr_images[6]="images/dvcom.jpg";
arr_images[7]="images/fatima.jpg";
arr_images[8]="images/fight.jpg";
arr_images[9]="images/globalservices.jpg";
arr_images[10]="images/houston-tunnel.jpg";
arr_images[11]="images/hussaingroup.jpg";
arr_images[12]="images/img-port1.jpg";
arr_images[13]="images/kmlg.jpg";
arr_images[14]="images/mercyinaction.jpg";
arr_images[15]="images/ncc.jpg";
arr_images[16]="images/nightlifeinteractive.jpg";
arr_images[17]="images/nishat.jpg";
arr_images[18]="images/patriotpictures.jpg";
arr_images[19]="images/Qn_holydayinn.jpg";
arr_images[20]="images/ramada.jpg";
arr_images[21]="images/surajcotton.jpg";
arr_images[22]="images/thefix.jpg";
arr_images[23]="images/tvnsystems.jpg";
arr_images[24]="images/usapparel.jpg";
arr_images[25]="images/webhostdirectoryreviews.jpg";

arr_subimages1[0]="images/atria2.jpg";
arr_subimages1[1]="images/bizbuilder2.jpg";
arr_subimages1[2]="images/bombonieres2.jpg";
arr_subimages1[3]="images/bribieIslandLife2.jpg";
arr_subimages1[4]="images/canter2.jpg";
arr_subimages1[5]="images/commercialtyre2.jpg";
arr_subimages1[6]="images/dvcom2.jpg";
arr_subimages1[7]="images/fatima2.jpg";
arr_subimages1[8]="images/fight1.jpg";
arr_subimages1[9]="images/globalservices2.jpg";
arr_subimages1[10]="images/houston-tunnel2.jpg";
arr_subimages1[11]="images/hussaingroup2.jpg";
arr_subimages1[12]="images/img-port2.jpg";
arr_subimages1[13]="images/kmlg2.jpg";
arr_subimages1[14]="images/mercyinaction1.jpg";
arr_subimages1[15]="images/ncc2.jpg";
arr_subimages1[16]="images/nightlifeinteractive1.jpg";
arr_subimages1[17]="images/nishat2.jpg";
arr_subimages1[18]="images/patriotpictures2.jpg";
arr_subimages1[19]="images/Qn_holydayinn1.jpg";
arr_subimages1[20]="images/ramada1.jpg";
arr_subimages1[21]="images/surajcotton2.jpg";
arr_subimages1[22]="images/thefix2.jpg";
arr_subimages1[23]="images/tvnsystems1.jpg";
arr_subimages1[24]="images/usapparel1.jpg";
arr_subimages1[25]="images/webhostdirectoryreviews1.jpg";

arr_subimages2[0]="images/atria3.jpg";
arr_subimages2[1]="images/bizbuilder3.jpg";
arr_subimages2[2]="images/bombonieres3.jpg";
arr_subimages2[3]="images/bribieIslandLife3.jpg";
arr_subimages2[4]="images/canter3.jpg";
arr_subimages2[5]="images/commercialtyre3.jpg";
arr_subimages2[6]="images/dvcom3.jpg";
arr_subimages2[7]="images/fatima3.jpg";
arr_subimages2[8]="images/fight2.jpg";
arr_subimages2[9]="images/globalservices3.jpg";
arr_subimages2[10]="images/houston-tunnel3.jpg";
arr_subimages2[11]="images/hussaingroup3.jpg";
arr_subimages2[12]="images/img-port3.jpg";
arr_subimages2[13]="images/kmlg3.jpg";
arr_subimages2[14]="images/mercyinaction2.jpg";
arr_subimages2[15]="images/ncc3.jpg";
arr_subimages2[16]="images/nightlifeinteractive2.jpg";
arr_subimages2[17]="images/nishat3.jpg";
arr_subimages2[18]="images/patriotpictures3.jpg";
arr_subimages2[19]="images/Qn_holydayinn2.jpg";
arr_subimages2[20]="images/ramada2.jpg";
arr_subimages2[21]="images/surajcotton3.jpg";
arr_subimages2[22]="images/thefix3.jpg";
arr_subimages2[23]="images/tvnsystems2.jpg";
arr_subimages2[24]="images/usapparel2.jpg";
arr_subimages2[25]="images/webhostdirectoryreviews2.jpg";


arr_subimages3[0]="images/atria4.jpg";
arr_subimages3[1]="images/bizbuilder4.jpg";
arr_subimages3[2]="images/bombonieres4.jpg";
arr_subimages3[3]="images/bribieIslandLife4.jpg";
arr_subimages3[4]="images/canter4.jpg";
arr_subimages3[5]="images/commercialtyre4.jpg";
arr_subimages3[6]="images/dvcom4.jpg";
arr_subimages3[7]="images/fatima4.jpg";
arr_subimages3[8]="images/fight3.jpg";
arr_subimages3[9]="images/globalservices4.jpg";
arr_subimages3[10]="images/houston-tunnel1.jpg";
arr_subimages3[11]="images/hussaingroup4.jpg";
arr_subimages3[12]="images/img-port4.jpg";
arr_subimages3[13]="images/kmlg4.jpg";
arr_subimages3[14]="images/mercyinaction3.jpg";
arr_subimages3[15]="images/ncc4.jpg";
arr_subimages3[16]="images/nightlifeinteractive3.jpg";
arr_subimages3[17]="images/nishat4.jpg";
arr_subimages3[18]="images/patriotpictures4.jpg";
arr_subimages3[19]="images/Qn_holydayinn3.jpg";
arr_subimages3[20]="images/ramada3.jpg";
arr_subimages3[21]="images/surajcotton4.jpg";
arr_subimages3[22]="images/thefix4.jpg";
arr_subimages3[23]="images/tvnsystems3.jpg";
arr_subimages3[24]="images/usapparel3.jpg";
arr_subimages3[25]="images/webhostdirectoryreviews3.jpg";


arr_text[0]="Atria Solutions focuses on niche markets in high-growth industries such as, IT and Telecom consulting services with expertise in designing, developing, maintaining and deploying IT and Telecom Solutions across all industries offering system analysis, development, integration, verification and deployment of business solutions.";
arr_text[1]="A company with a simple idea: to offer the greatest value in products and services for new business start-ups anywhere on the planet.  Today, BIZ Builder.Com offers a wide range of products and professional services to over 300,000 small, medium and large size businesses throughout the United States and beyond. Check the offers!";
arr_text[2]="The biggest and most established bombonieres company in Cyprus is now in your access too. Since 1985 we have offered the biggest selection of bombonieres, christening candles and other items. You will find some great bombonieres as always at great low prices.";
arr_text[3]="Your dreams can now become a reality with ownership of a uniquely designed island Villa. Careful consideration has been taken to meet your every need. You can enjoy superb quality and surprising space throughout your stay and with all facilities which one can desire.";
arr_text[4]="Canter Pvt. Ltd. is one fo the leading exporter of workwear and garments out of Pakistan";
arr_text[5]="Commercial Tire offers the best prices and the best selection of name-brand tires to fit your vehicle, your budget and your type of driving.";
arr_text[6]="DVCOM is Pakistan’s upcoming premier licensed LDI (Long Distance & International) and Limited Mobility telecom operator, aiming to play a key role in improving the telecom infrastructure & contributing to an explosive increase in country’s tele-density.";
arr_text[7]="A leading producer and exporter of superior quality 100% yarn in Pakistan.";
arr_text[8]="The one and only interactive virtual fighting community worldwide is now right here to get full fun and pleasure from the hectic routine of life.";
arr_text[9]="Global Services was founded in October 2004 as a dynamic trading company with the aim of providing unique services its clientele. Its main objective is to introduce new business ethics for a better professional environment";
arr_text[10]="Are you new to the tunnels and just want to find out where to get a coffee and a good book? Well now there’s a “light” in the tunnel for all to see! From breakfast to videos, haircuts to shoe repair, we will get you there and back in air-conditioned comfort.";
arr_text[11]="One of the leading, renowned and recognized Textile Group in creating, developing and manufacturing of yarn products right from basic to variety of high quality yarn";
arr_text[12]="The foundations of Nishat Chunian Ltd. (NCL) were laid in the year 1990. Since its inception as a single spinning unit, the company has expanded and diversified into a manufacturing and finishing operation consisting of five spinning units, one weaving unit, one dyeing & finishing unit and one stitching unit.";
arr_text[13]="Founded in the early 1950s in Pakistan, Kohinoor is a dynamic and efficient manufacturing company.";
arr_text[14]="A non-profit ministry that trains medics and midwives to provide compassionate health care to the poorest of the poor in developing nations, saving many lives and showing God love and kindness. Further it brings hope and healing to the poorest of the poor,wherever they are found, by serving with practical acts of compassion";
arr_text[15]="A UK based community college.";
arr_text[16]="A video game development, marketing & Management Company specializing in present day games that serve user over the age of 18 is right here to entertain you fully";
arr_text[17]="The foundations of Nishat Chunian Ltd. (NCL) were laid in the year 1990. Since its inception as a single spinning unit, the company has expanded and diversified into a manufacturing and finishing operation consisting of five spinning units, one weaving unit, one dyeing & finishing unit and one stitching unit.";
arr_text[18]="Don’t go any where; because here you can take pleasure to download material displayed on the Site for non-commercial and personal use only provided you also retain all copyright and other proprietary notices contained on the materials. So feel free to get yourself stick to ";
arr_text[19]="A 40 bedroom hotel with a rapid expansion and now owns nearly 400 hotel bedrooms in five locations across England & Wales, operating in all sectors of the hotel market - from up-market to limited service resulting in a portfolio of highly profitable assets across various parts of the U.K. enjoy your stay!";
arr_text[20]="It’s a place which you are waiting for a long time. Offering you deluxe accommodation with fabulous amenities and service with those extra touches to make your stay more congenial and everlasting.";
arr_text[21]="From Cotton to Steel, Computer Software to Banking & Insurance, Crescent Group has been a success story with almost 50 years of expertise in both manufacturing and service industry.";
arr_text[22]="The Fix is the first television network which broadcast entirely on the Internet.";
arr_text[23]="TVN Systems, Inc. is a research and development company dedicated to advancing and developing the proton exchange membrane (PEM) fuel cell market.";
arr_text[24]="US Apparel Group is multidimensional business group involved in textiles, construction and retail.";
arr_text[25]="We have brought the complete list of worldwide webhosting services reviewed by you! You can easily search through quick check Webhost features like adults, budget, dedicated, linux/Unix, Managed and lots of more. So you are only at a click away distance.";

arr_url[0]="http://www.atriasolutions.com/";
arr_url[1]="http://71.18.79.230/bizbuilder/";
arr_url[2]="http://www.bombonieres.com.cy/";
arr_url[3]="http://www.bribiesands.com.au/";
arr_url[4]="http://www.canter.com.pk/";
arr_url[5]="http://www.commercialtire.com/index.php";
arr_url[6]="http://www.dv.com.pk/";
arr_url[7]="http://www.fatima.com.pk/";
arr_url[8]="http://www.fight.de/index.php";
arr_url[9]="http://www.gsfze.com/gsfze/default.htm";
arr_url[10]="http://www.houston-tunnel.com/";
arr_url[11]="http://www.hussaingroup.com/index.php";
arr_url[12]="http://www.nctex.com/";
arr_url[13]="http://www.kmlg.com/kmlg/index.php";
arr_url[14]="http://www.mercyinaction.com/";
arr_url[15]="http://www.ncc.eu.com/";
arr_url[16]="http://www.nightlifeinteractive.net/";
arr_url[17]="http://www.nctex.com/";
arr_url[18]="http://www.patriotpictures.com/crenshaw/default.htm";
arr_url[19]="http://www.qnhgroup.com/";
arr_url[20]="http://www.qnhgroup.com/Page.php?pID=1001";
arr_url[21]="http://www.suraj.com/";
arr_url[22]="http://www.thefix.tv/";
arr_url[23]="http://www.tvnsystems.com/";
arr_url[24]="http://www.usapparel.com.pk/";
arr_url[25]="http://www.webhostdirectoryreviews.com/";

arr_images_featured[0]="images/f_03.jpg";
arr_images_featured[1]="images/lums_06.gif";
arr_images_featured[2]="images/riches_08.jpg";
arr_images_featured[3]="images/featureed_new_03.jpg";
arr_images_featured[4]="images/featureed_new_06.jpg";
arr_images_featured[5]="images/f_03.jpg";

arr_text_featured[0]='<span class="bodytext_bold">BRAND NINJA</span><br /><br />Branding Ninja is a website where there is a great variety under one place; users are facilitated with the creation of banner making, logo making, graphics and header.The responsibility of logo making website was given to Digital Media Venture by Logo warrior. A flash base design project; where anyone can create online logos even with the help of build in shape. Logo icons are controlled from admin end but the choice of choosing any industry is totally up to you. Have a look into www.logowarrior.com/online so extend your creativity along with logo and feel the difference.<br/><br/>Technology used: Conversion of SWF design into vector base EPS &amp; PNG product, Advance flash Scripting, integration of inkscap.';
arr_text_featured[1]='<span class="bodytext_bold">LUMS&nbsp;REDC</span><br /><br />Lahore University of Management Science is the one of the leading management institutes in south Asia region. Rausing Executive Development Center is executive education arm of the LUMS geared toward top management trainings.REDC wanted to revamp its website to appeal to top management in the local and regional companies. Digital Media Ventures was selected to undertake this redesign effort.Digital Media Ventures developed a Joomla CMS based website for them that could be managed completely from administration backend. Offline course scheduling was connected with the website through Oracle PHP connectivity.<br/><br/>Technology Used:Joomla, Oracle database and My SQL connectivity';
arr_text_featured[2]='<span class="bodytext_bold">RICHES&nbsp;ROOM</span><br /><br />BroadCast2.com an Australian multimedia company wanted to enter into digital content sharing marketing. For this purpose Digital Media Ventures was commissioned. Idea was to launch an array of video content sharing websites targeting niche markets. First website of this series is www.RitchiesRoom.com If you have an electronic mania, then Ritchie’s Room is a place for you. You can get exciting videos regarding computers, cell phones and all fields of your interest and latest updates as well. Here you can upload your favorite videos, view introductory videos on many electronic technologies and explore more and more in the world of electronic.<br/><br/>Technology used:JAVA Applet based video to FLV encoding, Smarty templates, FLV Streaming';
arr_text_featured[3]='<span class="bodytext_bold">DIGIDENT&nbsp;SOLUTIONS</span><br /><br />A wide spectrum of industry verticals with solutions focus in Identity and Access Management, Business Intelligence, Business Process Management, and Enterprise IT infrastructure only with the leading DigiDent.<br/><br/>So to ensure customers succeed in their goals, you will always find DigiDent with you';
arr_text_featured[4]='<span class="bodytext_bold">ACUTIS</span><br /><br />ITo build consistent, strategic partnerships to raise client returns and deliver measurable business value through a customer-centric focus on the highest quality standards, innovative pricing strategies and ultra-timely delivery only trust Outsourcing-Outstanding.';
arr_text_featured[5]='<span class="bodytext_bold">BRAND NINJA</span>Branding Ninja is a website where there is a great variety under one place; users are facilitated with the creation of banner making, logo making, graphics and header.The responsibility of logo making website was given to Digital Media Venture by Logo warrior. A flash base design project; where anyone can create online logos even with the help of build in shape. Logo icons are controlled from admin end but the choice of choosing any industry is totally up to you. Have a look into www.logowarrior.com/online so extend your creativity along with logo and feel the difference.<br/><br/>Technology used: Conversion of SWF design into vector base EPS &amp; PNG product, Advance flash Scripting, integration of inkscap.';

arr_url_featured[0]='http://www.logowarrior.com/online/'
arr_url_featured[1]='http://pms.digitalmediaventures.com/test_projects/lums/'
arr_url_featured[2]='http://www.ritchiesroom.com/'
arr_url_featured[3]='http://www.digident-solutions.com/'
arr_url_featured[4]='http://www.auctis.net/'
arr_url_featured[5]='http://www.logowarrior.com/online/'


arr_pagination_featured[0]='<img src="images/f_03.jpg" id="project_0" width="292" height="86" style="cursor:pointer;" onclick="javascript: change_text(\'proj_text\',\'<span class=bodytext_bold>BRAND NINJA</span><BR/><BR/>Branding Ninja is a website where there is a great variety under one place; users are facilitated with the creation of banner making, logo making, graphics and header.The responsibility of logo making website was given to Digital Media Venture by Logo warrior. A flash base design project; where anyone can create online logos even with the help of build in shape. Logo icons are controlled from admin end but the choice of choosing any industry is totally up to you. Have a look into www.logowarrior.com/online so extend your creativity along with logo and feel the difference.<br/><br/>Technology used: Conversion of SWF design into vector base EPS &amp; PNG product, Advance flash Scripting, integration of inkscap.\');change_url(\'proj_link\',\'http://www.logowarrior.com/online\');"/>';

arr_pagination_featured[1]='<img src="images/lums_06.gif" id="project_1" width="292" height="86" style="cursor:pointer;" onclick="javascript: change_text(\'proj_text\',\'<span class=bodytext_bold>LUMS REDC</span><BR/><BR/>Lahore University of Management Science is the one of the leading management institutes in south Asia region. Rausing Executive Development Center is executive education arm of the LUMS geared toward top management trainings.REDC wanted to revamp its website to appeal to top management in the local and regional companies. Digital Media Ventures was selected to undertake this redesign effort.Digital Media Ventures developed a Joomla CMS based website for them that could be managed completely from administration backend. Offline course scheduling was connected with the website through Oracle PHP connectivity.<br/><br/>Technology Used:Joomla, Oracle database and My SQL connectivity\');change_url(\'proj_link\',\'http://pms.digitalmediaventures.com/test_projects/lums\');"/>';

arr_pagination_featured[2]='<img src="images/riches_08.jpg" id="project_2" width="292" height="86" style="cursor:pointer;" onclick="javascript: change_text(\'proj_text\',\'<span class=bodytext_bold>RICHES ROOM</span><BR/><BR/>BroadCast2.com an Australian multimedia company wanted to enter into digital content sharing marketing. For this purpose Digital Media Ventures was commissioned. Idea was to launch an array of video content sharing websites targeting niche markets. First website of this series is www.RitchiesRoom.com If you have an electronic mania, then Ritchie’s Room is a place for you. You can get exciting videos regarding computers, cell phones and all fields of your interest and latest updates as well. Here you can upload your favorite videos, view introductory videos on many electronic technologies and explore more and more in the world of electronic.<br/><br/>Technology used:JAVA Applet based video to FLV encoding, Smarty templates, FLV Streaming\');change_url(\'proj_link\',\'http://www.ritchiesroom.com/\');"/>';

arr_pagination_featured[3]='<img src="images/featureed_new_03.jpg" id="project_0" width="292" height="86" style="cursor:pointer;" onclick="javascript: change_text(\'proj_text\',\'<span class=bodytext_bold>DIGIDENT&nbsp;SOLUTIONS</span><BR/><BR/>A wide spectrum of industry verticals with solutions focus in Identity and Access Management, Business Intelligence, Business Process Management, and Enterprise IT infrastructure only with the leading DigiDent.<br/><br/>So to ensure customers succeed in their goals, you will always find DigiDent with you\');change_url(\'proj_link\',\'http://www.digident-solutions.com\');"/>';

arr_pagination_featured[4]='<img src="images/featureed_new_06.jpg" id="project_1" width="292" height="86" style="cursor:pointer;" onclick="javascript: change_text(\'proj_text\',\'<span class=bodytext_bold>ACTUIS</span><BR/><BR/>To build consistent, strategic partnerships to raise client returns and deliver measurable business value through a customer-centric focus on the highest quality standards, innovative pricing strategies and ultra-timely delivery only trust Outsourcing-Outstanding.\');change_url(\'proj_link\',\'http://www.auctis.net\');"/>';

arr_pagination_featured[5]='<img src="images/f_03.jpg" id="project_0" width="292" height="86" style="cursor:pointer;" onclick="javascript: change_text(\'proj_text\',\'<span class=bodytext_bold>BRAND NINJA</span><BR/><BR/>Branding Ninja is a website where there is a great variety under one place; users are facilitated with the creation of banner making, logo making, graphics and header.The responsibility of logo making website was given to Digital Media Venture by Logo warrior. A flash base design project; where anyone can create online logos even with the help of build in shape. Logo icons are controlled from admin end but the choice of choosing any industry is totally up to you. Have a look into www.logowarrior.com/online so extend your creativity along with logo and feel the difference.<br/><br/>Technology used: Conversion of SWF design into vector base EPS &amp; PNG product, Advance flash Scripting, integration of inkscap.\');change_url(\'proj_link\',\'http://www.logowarrior.com/online\');"/>';

function InitializeTimer(page)
{
    // Set the length of the timer, in seconds
    secs = 10
    StopTheClock();
	page_for=page;
    StartTheTimer()
}

function StopTheClock()
{
    if(timerRunning)
        clearTimeout(timerID)
    timerRunning = false
}

function StartTheTimer()
{
    if (secs==0)
    {
        StopTheClock();
		
		if(page_for=="portfolio")
		{
			change_portfolio();
		}
		else
		{
			change_featured();
		}
	}
    else
    {
        self.status = secs
        secs = secs - 1
        timerRunning = true
        timerID = self.setTimeout("StartTheTimer()", delay)
    }
}
function change_thumbnail(obj_id,img_path)
{
	if(document.getElementById(obj_id))
	{
		document.getElementById(obj_id).src=img_path;
		if(page_for!="portfolio")
		{
			opacity(obj_id, 20, 100, 4000);
		}
		InitializeTimer(page_for);
	}
	else
	{
		//alert("Object not exists with id: "+obj_id);
	}
}
function change_text(obj_id,text)
{
	if(document.getElementById(obj_id))
	{
		document.getElementById(obj_id).innerHTML=text;
	}
	else
	{
		//alert("Object not exists with id: "+obj_id);
	}
}
function change_url(obj_id,url)
{
	if(document.getElementById(obj_id))
	{
		if(page_for=="portfolio")
		{
			document.getElementById(obj_id).innerHTML='<span class="red-slash">&nbsp;&nbsp;&nbsp;&nbsp;/&nbsp;&nbsp;</span><a href="'+url+'" target="_blank" class="a">Visit Site</a>&nbsp;&nbsp;';
		}
		else
		{
			document.getElementById(obj_id).innerHTML='<span class="red-slash">/&nbsp;&nbsp;</span><a href="'+url+'" class="a">Visit Site</a>';
		}
	}
	else
	{
		//alert("Object not exists with id: "+obj_id);
	}
}
function gotoMyUrl()
{
	//return location = gNewLocation;
}
function change_portfolio()
{
	img_index++;
	if(img_index>(arr_images.length-1))
	{
		img_index=0;
	}
	
	obj_id="thumbnail_img";
	image_path=arr_images[img_index];
	change_thumbnail(obj_id,image_path);
	
	obj_id="sub_image1";
	image_path=arr_subimages1[img_index];
	change_thumbnail(obj_id,image_path);
	
	obj_id="sub_image2";
	image_path=arr_subimages2[img_index];
	change_thumbnail(obj_id,image_path);
	
	obj_id="sub_image3";
	image_path=arr_subimages3[img_index];
	change_thumbnail(obj_id,image_path);
	
	obj_id="td_text";
	text=arr_text[img_index];
	change_text(obj_id,text);
	
	obj_id="url_link";
	url=arr_url[img_index];
	change_url(obj_id,url);
}

function change_featured()
{
	img_index++;
	if(img_index>(arr_images_featured.length-1))
	{
		img_index=0;
	}
	
	obj_id="proj_text";
	text=arr_text_featured[img_index];
	change_text(obj_id,text);
	
	obj_id="proj_link";
	url=arr_url_featured[img_index];
	change_url(obj_id,url);
	
	obj_id="project_"+(img_index%3);
	image_path=arr_images_featured[img_index];
	change_thumbnail(obj_id,image_path);
}
function show_images(img1,img2,img3)
{
	obj_id="project_0";
	change_thumbnail(obj_id,img1);
	obj_id="project_1";
	change_thumbnail(obj_id,img2);
	obj_id="project_2";
	change_thumbnail(obj_id,img3);
}



function opacity(id, opacStart, opacEnd, millisec) {
	//speed for each frame
	var speed = Math.round(millisec / 100);
	var timer = 0;

	//determine the direction for the blending, if start and end are the same nothing happens
	if(opacStart > opacEnd) {
		for(i = opacStart; i >= opacEnd; i--) {
			setTimeout("changeOpac(" + i + ",'" + id + "')",(timer * speed));
			timer++;
		}
	} else if(opacStart < opacEnd) {
		for(i = opacStart; i <= opacEnd; i++)
			{
			setTimeout("changeOpac(" + i + ",'" + id + "')",(timer * speed));
			timer++;
		}
	}
}

//change the opacity for different browsers
function changeOpac(opacity, id) {
	var object = document.getElementById(id).style; 
	object.opacity = (opacity / 100);
	object.MozOpacity = (opacity / 100);
	object.KhtmlOpacity = (opacity / 100);
	object.filter = "alpha(opacity=" + opacity + ")";
}

function shiftOpacity(id, millisec) {
	//if an element is invisible, make it visible, else make it ivisible
	if(document.getElementById(id).style.opacity == 0) {
		opacity(id, 0, 100, millisec);
	} else {
		opacity(id, 100, 0, millisec);
	}
}

function blendimage(divid, imageid, imagefile, millisec) {
	var speed = Math.round(millisec / 100);
	var timer = 0;
	
	//set the current image as background
	document.getElementById(divid).style.backgroundImage = "url(" + document.getElementById(imageid).src + ")";
	
	//make image transparent
	changeOpac(0, imageid);
	
	//make new image
	document.getElementById(imageid).src = imagefile;

	//fade in image
	for(i = 0; i <= 100; i++) {
		setTimeout("changeOpac(" + i + ",'" + imageid + "')",(timer * speed));
		timer++;
	}
}

function currentOpac(id, opacEnd, millisec) {
	//standard opacity is 100
	var currentOpac = 100;
	
	//if the element has an opacity set, get it
	if(document.getElementById(id).style.opacity < 100) {
		currentOpac = document.getElementById(id).style.opacity * 100;
	}

	//call for the function that changes the opacity
	opacity(id, currentOpac, opacEnd, millisec)
}

function show_pagination(obj_id,pages_required,total_records,arr_items,next_page)
{
	var items_per_page;
	var previous_link;
	var next_link;
	var pagination;
	var i=1;
	var end_to;
	var start_from;
	arr_contents=arr_items;
	items_per_page=Math.round(total_records/pages_required);
	end_to=0;
	next_page=2;
	if(next_page>pages_required)
	{
		next_page=1;
	}
	start_from=next_page;
	end_to=start_from+items_per_page;
	previous_link='<span class="bodytext_green_bold"><a href="#"  onclick="javascript: show_pagenation_images(0,3);" class="greenlink"><&nbsp;Previous</a></span>';
	next_link='<span class="bodytext_green_bold"><a href="#"  onclick="javascript: show_pagenation_images(3,6);" class="greenlink">&nbsp;Next></a></span>';
	
	pagination=previous_link;
	end_to=0;
	while(i<=pages_required)
	{
		start_from=end_to;
		end_to=end_to+items_per_page;
				
		pagination=pagination+'&nbsp;&nbsp;<a href="#" class="redlink" onclick="javascript: show_pagenation_images('+start_from+','+end_to+');">'+i+'</a>&nbsp;.&nbsp;';
		i++;
	}
	pagination=pagination+next_link;
	document.getElementById(obj_id).innerHTML=pagination;
}
function next_pageination()
{
	next_page=next_page+1;
}
function prev_page()
{
	next_page=next_page-1;
}
function show_pagenation_images(start_from,end_to)
{
	var i=start_from;
	img_index=start_from;
	obj_id="proj_text";
	text=arr_text_featured[img_index];
	change_text(obj_id,text);
	obj_id="proj_link";
	url=arr_url[img_index];
	change_url(obj_id,url);
		
	while(i<end_to)
	{
		obj_id="td_project_"+(i%3);
		img=arr_contents[i];
		document.getElementById(obj_id).innerHTML=img;
		i++;
	}
	InitializeTimer("client");
}
