
var ajax = new Array();
function showhint(str,root)
{
	//alert(root);
  var index = ajax.length;
	ajax[index] = new sack();
		
	ajax[index].requestFile = root+'portfolio/showimg/'+str;
  
		// Specifying which file to get;
	ajax[index].onCompletion = function(){ createExistingBrochureList(index,str) };	// Specify function that will be executed after file has been found
	ajax[index].runAJAX();		// Execute AJAX function
}
function createExistingBrochureList(index,str)
{
	//var obj = document.getElementById('existingPicture');
	document.getElementById(str).innerHTML=ajax[index].response;
}
function showhint1(str,root)
{
	//alert(root);
  var index = ajax.length;
	ajax[index] = new sack();
		
	ajax[index].requestFile = root+'portfolio/showimg1/'+str;
  
		// Specifying which file to get;
	ajax[index].onCompletion = function(){ createExistingBrochureList1(index,str) };	// Specify function that will be executed after file has been found
	ajax[index].runAJAX();		// Execute AJAX function
}
function createExistingBrochureList1(index,str)
{
	//var obj = document.getElementById('existingPicture');
	document.getElementById(str).innerHTML=ajax[index].response;
}
function slideshow(str,root)
{
	//alert(root);
	var index = ajax.length;
	ajax[index] = new sack();
	ajax[index].requestFile = root+'portfolio/slideshow/'+str;
	ajax[index].onCompletion = function(){ slideshow1(index) };
	ajax[index].runAJAX();	
}
function slideshow1(index)
{
	var Divobj = document.getElementById('slideDiv');
	//alert(ajax[index].response);
	Divobj.innerHTML = '';
	Divobj.innerHTML=ajax[index].response;
	function startSlideshow() {
		var slideshow = new timedSlideShow($('mySlideshow'), mySlideData);
	}
	addLoadEvent(startSlideshow);
	
}
function flvplay(str,root,flvtype)
{
	 //alert(root);
	
	if(flvtype != '') var ft = '/'+flvtype;
	////////show hide data
	if(document.getElementById) {
		var shDV = document.getElementById('flvplaydiv');
		var hdDV = document.getElementById('rendID');
	} else if (document.all){
		var shDV = document.all['flvplaydiv'];
		var hdDV = document.all['rendID'];
	}
	hdDV.innerHTML = '';
	hdDV.style.display ='none';	
	shDV.style.display ='block';
	// css changes
	toggle (str);
	// 		
	var index = ajax.length;
	ajax[index] = new sack();
	ajax[index].requestFile = root+'portfolio/play/'+str+ft;
	ajax[index].onCompletion = function(){ flvplay1(index) };
	ajax[index].runAJAX();	
}

function flvplay1(index)
{
	document.getElementById('flvplaydiv').innerHTML=ajax[index].response;
	// for scrollinh
	new Effect.ScrollTo('outerDiv',{duration:1.0}); return false;
}


function flvPlayHome(str,root,flvtype)
{
	 //alert(root);
	toggle (str);
	if(flvtype != '') var ft = '/'+flvtype;
	/////////show hide data
	if(document.getElementById) {
		var shDV = document.getElementById('flvplaydiv');
		var hdDV = document.getElementById('rendID');
	} else if (document.all){
		var shDV = document.all['flvplaydiv'];
		var hdDV = document.all['rendID'];
	}
	hdDV.innerHTML = '';
	hdDV.style.display ='none';	
	shDV.style.display ='block';

	var index = ajax.length;
	ajax[index] = new sack();
	ajax[index].requestFile = root+'welcome/FLVplay/'+str+ft;
	ajax[index].onCompletion = function(){ flvPlayHomeInn(index) };
	ajax[index].runAJAX();	
}

function flvPlayHomeInn(index)
{
	document.getElementById('flvplaydiv').innerHTML=ajax[index].response;
	// for scrollinh
	new Effect.ScrollTo('outerDiv',{duration:1.0}); return false;
}



