function displayFlash(src, width, height) {
	document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="' + width + '" height="' + height + '">');
	document.write('<param name="movie" value="' + src + '">');
	document.write('<param name="quality" value="high">');
	document.write('<embed src="' + src + '" quality="high" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="' + width + '" height="' + height + '" menu="0"></embed>');
	document.write('</object>');
}

function displayDirector(src, width, height) {
	document.write('<object classid="clsid:166B1BCA-3F9C-11CF-8075-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/director/sw.cab#version=7,0,2,0" width="' + width + '" height="' + height + '">');
	document.write('<param name="swRemote" value="swSaveEnabled=\'true\' swVolume=\'true\' swRestart=\'true\' swPausePlay=\'true\' swFastForward=\'true\' swContextMenu=\'true\'">');
	document.write('<param name="swStretchStyle" value="meet">');
	document.write('<param name="bgColor" value="#000000">');
	document.write('<param name="src" value="' + src + '">');
	document.write('<embed src="' + src + '" width="' + width + '" height="' + height + '" bgColor="#000000" swRemote="swSaveEnabled=\'true\' swVolume=\'true\' swRestart=\'true\' swPausePlay=\'true\' swFastForward=\'true\' swContextMenu=\'true\'" swStretchStyle="meet" type="application/x-director" pluginspage="http://www.macromedia.com/shockwave/download/"></embed>');
	document.write('</object>');
}

function displayIFrame(src, width, height) {
	document.write('<iframe src="' + src + '" height="' + height + '" width="' + width + '"></iframe>');
}

function displayWindow(src, thumb, title, width, height) {
	document.write('<table>');
	document.write('<tr>');
	document.write('<td align="right" width="190">');
	document.write('<a href="' + src + '" target="_blank"><img src="' + thumb + '" id="y8logo" height="135" width="180" /></a>');
	document.write('</td>');
	document.write('<td align="left" width="190">');
	document.write('<a href="' + src + '" target="_blank"><font size="4">Click here to play<br /><b>' + title + '</b></font></a>');
	document.write('</td>');
	document.write('</tr>');
	document.write('</table>');
}

function displayFlashVars(src, width, height, flashvars) {
	document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="' + width + '" height="' + height + '">');
	document.write('<param name="movie" value="' + src + '">');
	document.write('<param name="quality" value="high">');
	document.write('<param name="wmode" value="transparent" />');
	document.write('<param name="flashVars" value="' + flashvars + '">');
	document.write('<embed src="' + src + '" wmode="transparent" quality="high" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="' + width + '" height="' + height + '" menu="0" flashVars="' + flashvars + '"></embed>');
	document.write('</object>');
}

function preLoadPicture(pic) {
	heavyImage = new Image(); 
	heavyImage.src = CurUrl + pic + ".jpg";

}

// 2 5 8 11 14 17 20 23 26 29
// setTimeout("immobile_100()",3000);

var OriPicNum = 0;
var CurDocument = 0;
var CurPicNum = 0;
var CurUrl = "";

function getNextThumbNum(CurNum) {
	thumbs = new Array(2,5,8,11,14,17,20,23,26,29);
	for (i = 0; i < thumbs.length; i++) {
		if (thumbs[i] > CurNum) {
			return thumbs[i];
		}
	}
	return thumbs[0];
}

function nextThumbnail(idDoc) {
	if (CurDocument != 0 && idDoc == CurDocument) {
		//alert("CurPicNum : " + CurPicNum + " CurDocument : " + CurDocument);
		//alert(document.getElementById("pic_" + CurDocument));
		document.getElementById("pic_" + CurDocument).src = CurUrl + CurPicNum + ".jpg";
		nextthumb = getNextThumbNum(CurPicNum);
		preLoadPicture(nextthumb);
		CurPicNum = nextthumb;
		setTimeout("nextThumbnail("+ CurDocument +")", 1000);
	}
}

function stopThumbSlide() {
	TmpDoc = CurDocument;
	CurDocument = 0;
	document.getElementById("pic_" + TmpDoc).src = CurUrl + OriPicNum + ".jpg";	
}

function startThumbSlide(IdDoc, CurNum, Url) {
	if (CurDocument == 0) {
		OriPicNum = CurNum;
		CurDocument = IdDoc;
		CurUrl = Url;
		nextthumb = getNextThumbNum(CurNum);
		preLoadPicture(nextthumb);
		CurPicNum = nextthumb;
		setTimeout("nextThumbnail("+ CurDocument +")", 20);
	}
}
// new file added by kryptx 2008-07-05

// if you decide to use fewer or more images than 6, change this
var imageCount = 6;
var intervals = new Object();
var curFrame;
var rotatingImageId = null;
var rotatingImageFilename = null;

function rotate(id, image) {
	curFrame = 1;
	rotatingImageId = id;
	rotatingImageFilename = image;
	intervals[id] = setInterval(swapFrame, 600);
}

function swapFrame() {
	curFrame ++;
	if(curFrame > imageCount) curFrame = 1;
	if(curFrame == 1) document.getElementById(rotatingImageId).src = rotatingImageFilename;
	else {
		document.getElementById(rotatingImageId).src = rotatingImageFilename.substr(0, rotatingImageFilename.lastIndexOf(".")) + "_"
			 + curFrame + ".jpg";
	}
}
var nmi =' 30'; 
function stopRotate(id, image) {
	clearInterval(intervals[id]);
	document.getElementById(id).src = image;
}
/**
 * Javascript class for the Rater plugin
 


    mouseOver: function(num){
        if (!this.locked){
            if (num == 0)
                this.feedback_box.innerHTML = "1/5";
            else if (num == 1)
                this.feedback_box.innerHTML = "2/5";
            else if (num == 2)
                this.feedback_box.innerHTML = "3/5";
            else if (num == 3)
                this.feedback_box.innerHTML = "4/5 Good";
            else if (num == 4)
                this.feedback_box.innerHTML = "5/5 Great";
                
            for (var i = 0; i <= num; i++)
                $(this.object_name + "_rating_etoi_" + i).className = "star etoi_full";
            for (var i = num + 1; i < 5; i++)
                $(this.object_name + "_rating_etoi_" + i).className = "star etoi_empty";
        }
		function show_progress() {
	document.getElementById('progress').style.display = 'block';
	document.getElementById('fileselect').style.display = 'none';
}
    }
    */
		
			
	//document.getElementById('progress').style.display = 'block';
	//document.getElementById('fileselect_1').className= 'star etoi_empty';
	//var i = 1 ;
 //   var btn = document.getElementById('rating_etoi_1');
//btn.className= 'star etoi_empty';  
	//document.getElementById('rater_video_188207_rating_etoi_1').className = "star etoi_empty";    
	//if (!this.locked){
         /*   if (num == 0)
                this.feedback_box.innerHTML = "1/5";
            else if (num == 1)
                this.feedback_box.innerHTML = "2/5";
            else if (num == 2)
                this.feedback_box.innerHTML = "3/5";
            else if (num == 3)
                this.feedback_box.innerHTML = "4/5 Good";
            else if (num == 4)
                this.feedback_box.innerHTML = "5/5 Great";
              */  

				  
function show_progress() {
document.getElementById('fileselect_0').className= 'star etoi_full';              
document.getElementById('fileselect_1').className= 'star etoi_empty';
document.getElementById('crap').className= 'star etoi_empty';
document.getElementById('und').className= 'star etoi_empty';
document.getElementById('fe').className= 'star etoi_empty';
}
function show_progress1() {
document.getElementById('fileselect_0').className= 'star etoi_full';              
document.getElementById('fileselect_1').className= 'star etoi_full';
document.getElementById('crap').className= 'star etoi_empty';
document.getElementById('und').className= 'star etoi_empty';
document.getElementById('fe').className= 'star etoi_empty';
			}
function show_crap() {
document.getElementById('fileselect_0').className= 'star etoi_full';              
document.getElementById('fileselect_1').className= 'star etoi_full';
document.getElementById('crap').className= 'star etoi_full';
document.getElementById('und').className= 'star etoi_empty';
document.getElementById('fe').className= 'star etoi_empty';
			}    
function show_und() {
document.getElementById('fileselect_0').className= 'star etoi_full';              
document.getElementById('fileselect_1').className= 'star etoi_full';
document.getElementById('crap').className= 'star etoi_full';
document.getElementById('und').className= 'star etoi_full';
document.getElementById('fe').className= 'star etoi_empty';
			}    
function show_fe() {
document.getElementById('fileselect_0').className= 'star etoi_full';              
document.getElementById('fileselect_1').className= 'star etoi_full';
document.getElementById('crap').className= 'star etoi_full';
document.getElementById('und').className= 'star etoi_full';
document.getElementById('fe').className= 'star etoi_full';
			}   	  
				  
function show_out() {
document.getElementById('fileselect_0').className= 'star etoi_full';              
document.getElementById('fileselect_1').className= 'star etoi_full';
document.getElementById('crap').className= 'star etoi_full';
document.getElementById('und').className= 'star etoi_empty';
document.getElementById('fe').className= 'star etoi_empty';
			}   			  
				  
/*               
function show_progress(num) {
if (num == 0)
{
document.getElementById('fileselect_0').className= 'star etoi_full';              
document.getElementById('fileselect_1').className= 'star etoi_empty';
document.getElementById('crap').className= 'star etoi_empty';
document.getElementById('und').className= 'star etoi_empty';
document.getElementById('fe').className= 'star etoi_empty';
}
 else if (num == 1)
			{
document.getElementById('fileselect_0').className= 'star etoi_full';              
document.getElementById('fileselect_1').className= 'star etoi_full';
document.getElementById('crap').className= 'star etoi_empty';
document.getElementById('und').className= 'star etoi_empty';
document.getElementById('fe').className= 'star etoi_empty';
			}
            else if (num == 2)
            {
document.getElementById('fileselect_0').className= 'star etoi_full';              
document.getElementById('fileselect_1').className= 'star etoi_full';
document.getElementById('crap').className= 'star etoi_full';
document.getElementById('und').className= 'star etoi_empty';
document.getElementById('fe').className= 'star etoi_empty';
			}    
            else if (num == 3)
            {
document.getElementById('fileselect_0').className= 'star etoi_full';              
document.getElementById('fileselect_1').className= 'star etoi_full';
document.getElementById('crap').className= 'star etoi_full';
document.getElementById('und').className= 'star etoi_full';
document.getElementById('fe').className= 'star etoi_empty';
			}    
            else if (num == 4)
            {
document.getElementById('fileselect_0').className= 'star etoi_full';              
document.getElementById('fileselect_1').className= 'star etoi_full';
document.getElementById('crap').className= 'star etoi_full';
document.getElementById('und').className= 'star etoi_full';
document.getElementById('fe').className= 'star etoi_full';
			} 
				  
}			  
*/				  
				  
				  
				  
     /*       for (var i = 0; i <= num; i++)
			{
                document.getElementById('fileselect_'+i).className= 'star etoi_full';
			}

            for (var i = num + 1; i < 5; i++)
			{
                document.getElementById('fileselect_'+i).className= 'star etoi_empty';
			}
 */
 /*          for (var i = 0; i <= num; i++)
                document.getElementById('rater_video_188207_rating_etoi_'+i).className = "star etoi_full";
            for (var i = num + 1; i < 5; i++)
                document.getElementById('rater_video_188207_rating_etoi_'+i).className = "star etoi_empty";
 */     
   //rater_video_188207_rating_etoi_0    
	
//	}
		
		
