var swfu;

var swfu2;

var progress;

Array.prototype.unique =

  function() {

    var a = [];

    var l = this.length;

    for(var i=0; i<l; i++) {

      for(var j=i+1; j<l; j++) {

        // If this[i] is found later in the array

        if (this[i] === this[j])

          j = ++i;

      }

      a.push(this[i]);

    }

    return a;

  }; 

  

	

	

function applySelStamp()

{

var FileCode;

var divname;

if(document.getElementById("div_fileUploader").style.display != "none")

{

FileCode = collectedfilesFromQueue();

//divname = "prepareActionLink";

}

else

{

FileCode = document.getElementById('fCode').value;//"$fileInfo[Code]";

//divname = "div_fileControls";

}

//alert("FileCode:"+FileCode);
    var formName = document.getElementById("div_stampFilesPit");
    var inputs = formName.getElementsByTagName("INPUT");
	var id;
		
    for ( var i = 0; i < inputs.length; ++i )
    {
        var inp = inputs[i];
		
		if(inp.type == "radio")
		{
			if(inp.name=="stampImg")
			{
				if(inp.checked == true)
				{
					id = inp.value;
					//selectedIDs.push(inp.id)
				}
			}
		}
    }
	

var sPos=getSelectedButton("", document.StampAlign.stampPos);
var stampPosition= document.StampAlign.stampPos[sPos].value;


var Action="coms_total=1&com1_fileCode="+FileCode+"&com1_userid="+document.getElementById('userid').value+"&com1_action=stampFile&com1_stampCode="+id+"&com1_stampPosition="+stampPosition;

//alert(Action);



         $.ajax({

	   type: "POST",

	   url: document.location.protocol + "//" + document.location.host + "/gallery/includes/gallery2.php",

	   data: Action,

	   beforeSend: function(XMLHttpRequest){

            //loading...

		 showStatusMsg("loading..");//$vbphrase[loading]

            },

	   success: function(msg){

//alert(msg);

		hideStatusMsgTimer("Success");//$vbphrase[success]

		//if(document.getElementById("div_fileUploader").style.display == "none")
		if(FileCode == document.getElementById('fCode').value)
		{

			var d = new Date();

			var Time = d.getTime();

			var fileSrc="http://www.yabdoo.com/gallery/watch.php?f="+FileCode+"&showSize=resized&time="+Time;

			var thumbSrc="http://www.yabdoo.com/gallery/watch.php?f="+FileCode+"&showType=Capture&showSize=thumb&time="+Time;

				document.getElementById("player").src=fileSrc;

			var htmlc='<img id="player" style="width:440px;height:365px;color:#ff0000;font-weight:bold" src='+fileSrc+'/>';

			var thumbc='<img width="80" height="70" border="1" align="left" alt="" src='+thumbSrc+'/>';

//alert("update: " + htmlc);

				$("#imgPlayer").html(htmlc);

		}

		

		Popup.hideAll(); ClearDiv('uPrepareContent');

		

		//var JSONFile= 'var gotData =' + $.trim(msg)+ '';

			//eval(JSONFile);

            }

	 });

}



function fileQueued(file) {

	try {

ShowPanel("div_uploadQueue");

ShowPanel("div_totalQueue");



//alert("fileQueued...");

//alert("file:"+file);

if(document.getElementById("replaceContent4"))
if(document.getElementById("replaceContent4").style.display != "none")
ShowPanel("PopDiv4");


if(document.getElementById("sortable"))
if(document.getElementById("sortable").innerHTML == "")
 document.getElementById("sortable").innerHTML="";



		var progress = new FileProgress(file, this.customSettings.progressTarget);

		progress.setStatus('<p align="center" style="padding:6px;">Pending<br/>0%</p>');

		progress.toggleCancel(true, this);

//alert("3");		



filesQueued = 1;



	} catch (ex) {

		this.debug(ex);

	}



}



function fileQueueError(file, errorCode, message) {

	try {

		if (errorCode === SWFUpload.QUEUE_ERROR.QUEUE_LIMIT_EXCEEDED) {

			//alert("You have attempted to queue too many files.\n" + (message === 0 ? "You have reached the upload limit." : "You may select " + (message > 1 ? "up to " + message + " files." : "one file.")));

			return;

		}



		var progress = new FileProgress(file, this.customSettings.progressTarget);

		progress.setError();

		progress.toggleCancel(false);



		switch (errorCode) {

		case SWFUpload.QUEUE_ERROR.FILE_EXCEEDS_SIZE_LIMIT:

			progress.setStatus("File is too big.");

			this.debug("Error Code: File too big, File name: " + file.name + ", File size: " + file.size + ", Message: " + message);

			break;

		case SWFUpload.QUEUE_ERROR.ZERO_BYTE_FILE:

			progress.setStatus("Cannot upload Zero Byte files.");

			this.debug("Error Code: Zero byte file, File name: " + file.name + ", File size: " + file.size + ", Message: " + message);

			break;

		case SWFUpload.QUEUE_ERROR.INVALID_FILETYPE:

			progress.setStatus("Invalid File Type.");

			this.debug("Error Code: Invalid File Type, File name: " + file.name + ", File size: " + file.size + ", Message: " + message);

			break;

		default:

			if (file !== null) {

				progress.setStatus("Unhandled Error");

			}

			this.debug("Error Code: " + errorCode + ", File name: " + file.name + ", File size: " + file.size + ", Message: " + message);

			break;

		}

	} catch (ex) {

        this.debug(ex);

    }

}



function fileDialogComplete(numFilesSelected, numFilesQueued) {

//	alert("numFilesQueued:" + numFilesQueued);

	try {

		if (numFilesQueued> 0) {

			if(document.getElementById("replaceContent4"))

			if(document.getElementById("replaceContent4").style.display != "none")

			ShowPanel("PopDiv4");

			//alert("fileDialogComplete.111" + document.getElementById('userid').value);

			//alert("fileDialogComplete.222" + document.getElementById('securitytoken').value);

					this.addPostParam('userid', document.getElementById('userid').value);

					this.addPostParam('securitytoken', document.getElementById('securitytoken').value);

					this.startUpload();

	

		//alert("fileDialogComplete.2");		

                }

	   } catch (ex)  {

        this.debug(ex);

	}

}



function uploadStart(file) {

//	alert("file:"+file);	

	try {

			//alert("uploadStart.0");



		/* I don't want to do any file validation or anything,  I'll just update the UI and

		return true to indicate that the upload should start.

		It's important to update the UI here because in Linux no uploadProgress events are called. The best

		we can do is say we are uploading.

		 */

//alert("securitytoken:"+sendingObj2.securitytoken);	

//alert("action:"+sendingObj2.com1_action);

//alert("uploadType:"+sendingObj2.com1_uploadType);

//alert("userid:"+sendingObj2.userid);		 

//alert("uploadStart.1");		 

		var progress = new FileProgress(file, this.customSettings.progressTarget);

		progress.setStatus('<p align="center" style="padding:6px;">Uploading<br/>0%</p>');

		progress.toggleCancel(true, this);

		//fileQueued(file);

//alert("uploadStart.2");				

	}

	catch (ex) {

		//this.debug(ex);

		}

	

	return true;

}



function uploadProgress(file, bytesLoaded, bytesTotal) {

//alert("uploadProgress...");		

	try {

		var percent = Math.ceil((bytesLoaded / bytesTotal) * 100);



		var progress = new FileProgress(file, this.customSettings.progressTarget);

		//progress.setProgress(percent);

		progress.setStatus('<p align="center" style="padding:6px;">Uploading<br/>'+percent+'%</p>');

	} catch (ex) {

		this.debug(ex);

	}

}



function TextUploadComplete(Data)

{

   //var result="http://www.google.com/images/nav_logo40.png|||iEShWasFxX";

   

var AllFiles=Data.split(",");

var targetContent="";

targetContent= Data;

/*

for(var i=0; i<AllFiles.length; i++)

{

 var sArr=AllFiles[i].split("|");

 var fileCode=sArr[1];



  var fileSrc="http://www.yabdoo.com/gallery/watch.php?f="+fileCode+"&showSize=thumb";

  var fileUrl="http://www.yabdoo.com/gallery/show.php?f="+fileCode;

  targetContent+= '<li id="q_'+fileCode+'" style="float:left; position:relative; margin:2px; margin-bottom:24px;"><img src="http://www.yabdoo.com/gallery/watch.php?f='+fileCode+'&showSize=thumb" width="60" height="55" ondblclick="queueDoubleClick(\''+fileCode+'\', \'selected\', \'\')" style="cursor:pointer; position:relative; border:solid 1px #999999; background-image:none; float:left;"/><div id="visit_'+fileCode+'" style="cursor:pointer; position:absolute; background-color:#e7e7e7; border:solid 1px #999999; font-size:9px; width:56px; padding-right:3px; top:56px; left:0px; text-align:left;"><input name="frm_prepare_cb" type="checkbox" value='+fileCode+' style="float:left" checked></span> <span style="float:right"><a class="blue" onclick="javascript:window.open(\'http://www.yabdoo.com/gallery/show.php?f='+fileCode+'\');">visit</a></span></div></li>';

  

//HidePanel("visit_"+sArr[0]);

//ShowPanel("status_"+sArr[0]);

}

*/

   

 ShowPanel("div_actions"); 

 ShowPanel("div_uploadQueue");

 ShowPanel("div_totalQueue");

 ShowPanel("div_plusQuickUploadBtn");

 QUploadAfterLoadingComplete();



addToQuickUpload(targetContent);

document.getElementById("div_quickUploadContent").style.width = "375px";

}



function backgroundImageUploadSuccess(ReceivedData)

{

  //alert("Iam here inside backgroundImageUploadSuccess");

  //alert("status:"+ReceivedData['status']);

 // //alert("imagelink:"+ReceivedData['link']);

  

//function for changing bg theme...

 ClearDiv("bgUploaderContent");

 //changeBGTheme(ReceivedData['color'], ReceivedData['link']);

 //document.getElementById("bgImageThumb").src=ReceivedData['link'];

}





function replaceUploadSuccess(ReceivedData)

{

//alert("Iam here inside replaceUploadSuccess");

 if(ReceivedData['status']=="success")

 {

////alert(ReceivedData.length);

//alert(ReceivedData['fileCode']);



var fileCode=ReceivedData['fileCode'];

var d = new Date();

var Time = d.getTime();

var fileSrc="http://www.yabdoo.com/gallery/watch.php?f="+fileCode+"&showSize=resized&time="+Time;

var thumbSrc="http://www.yabdoo.com/gallery/watch.php?f="+fileCode+"&showType=Capture&showSize=thumb&time="+Time;

   document.getElementById("player").src=fileSrc;

var htmlc='<img id="player" style="width:440px;height:365px;color:#ff0000;font-weight:bold" src='+fileSrc+'/>';

var thumbc='<img width="80" height="70" border="1" align="left" alt="" src='+thumbSrc+'/>';

$("#imgPlayer").html(htmlc);

$("#fileinfo_thumb").html(thumbc);

   ClearDiv("replaceUploaderContent");

   //Popup.hideAll();

   HidePanel('PopDiv4'); 

   HidePanel('replaceContent4'); 

 }

}



function stampUploadSuccess(ReceivedData)

{

////alert("Iam here inside stampUploadSuccess");

 if(ReceivedData['status']=="success")

 {

   ClearDiv("stampUploaderContent");

   //Popup.hideAll();

   selectStamps();  

 }

}



function quickUploadSuccess(ReceivedData)

{

//alert("Iam here inside quickUploadSuccess");



//alert("TYPE:"+ReceivedData['Type']);



// if(ReceivedData['status']=="success")

 {

// //alert(ReceivedData['fileCode']);



  /*

var fileCode=ReceivedData['fileCode'];

  var fileSrc="http://www.yabdoo.com/gallery/watch.php?f="+fileCode+"&showSize=thumb";

  var fileUrl="http://www.yabdoo.com/gallery/show.php?f="+fileCode;



var targetContent="";

 targetContent+= '<li id="q_'+fileCode+'" style="float:left; position:relative; margin:2px; margin-bottom:24px;"><img src="http://www.yabdoo.com/gallery/watch.php?f='+fileCode+'&showSize=thumb" width="60" height="55" ondblclick="queueDoubleClick(\''+fileCode+'\', \'selected\', \''+ReceivedData['Type']+'\')" style="cursor:pointer; position:relative; border:solid 1px #999999; background-image:none; float:left;"/><div id="visit_'+fileCode+'" style="cursor:pointer; position:absolute; background-color:#e7e7e7; border:solid 1px #999999; font-size:9px; width:56px; padding-right:3px; top:56px; left:0px; text-align:left;"><input name="frm_prepare_cb" type="checkbox" value='+fileCode+' style="float:left" checked></span> <span style="float:right"><a class="blue" onclick="javascript:window.open(\'http://www.yabdoo.com/gallery/show.php?f='+fileCode+'\');">view</a></span></div></li>';

   */

/*

  progress.setStatus('<img id="q_'+fileCode+'" src='+fileSrc+' width="60"  height="55" ondblclick="queueDoubleClick(\''+fileCode+'\', \'selected\');" onmouseover="selectedImgMouseOver(this.id);" onmouseout="selectedImgMouseOut(this.id);" style="cursor:pointer; position:relative; border:solid 1px #999999; background-image:none; float:left;"/><div id="visit_'+fileCode+'" style="cursor:pointer; position:absolute; background-color:#e7e7e7; border:solid 1px #999999; font-size:9px; width:56px; padding-right:3px; top:56px; left:0px; text-align:left;"><input name="frm_prepare_cb" type="checkbox" value='+fileCode+' style="float:left" checked></span> <span style="float:right"><a class="blue"  onclick="javascript:window.open(\''+fileUrl+'\');">view</a></span></div>');

*/

	//addToQuickUpload(targetContent);

	

//alert("Data:" + ReceivedData['blockData']);



	///addToQuickUpload(ReceivedData['uploadedFilesData'][0]['blockData']);

	

	//ShowPanel("div_plusQuickUploadBtn");

	

 	

 }

}





function uploadSuccess(file, serverData) {

//alert("uploadSuccess");



//alert("serverData: " + serverData);

	try {

		var JSONFile= 'var ReceivedData =' + $.trim(serverData);

//alert("b4 eval");



		eval(JSONFile);

//alert("after eval");



		progress = new FileProgress(file, this.customSettings.progressTarget);

		progress.setComplete();

		//progress.setStatus("Complete.");

		////alert(file.id)

for (var i=0; i<ReceivedData.length; i++)

{

//alert(serverData);

//alert(ReceivedData[i]);

//alert("b4 eval process1");

//alert(ReceivedData[i]['internalEval'][0]);



//alert(ReceivedData[i]['eval'][0]);

if (ReceivedData[i]['eval']);
EvalProcess(ReceivedData[i]['eval']);
//alert("b4 eval process2");
if(ReceivedData[i]['internalEval'])
eval(ReceivedData[i]['internalEval'][0]);
//EvalProcess(ReceivedData[i]['internalEval']);
//alert("b4 eval process2");



//EvalProcess(ReceivedData[i]['eval']);



//alert("after eval process");

//alert("b4 workWithThisFunction");

//alert(ReceivedData[i]);

workWithThisFunction(ReceivedData[i]);

//alert("after workWithThisFunction");

}



	} catch (ex) {

		this.debug(ex);

	}

}



function uploadError(file, errorCode, message) {

	try {

		var progress = new FileProgress(file, this.customSettings.progressTarget);

		progress.setError();

		progress.toggleCancel(false);



		switch (errorCode) {

		case SWFUpload.UPLOAD_ERROR.HTTP_ERROR:

			progress.setStatus("Upload Error: " + message);

			this.debug("Error Code: HTTP Error, File name: " + file.name + ", Message: " + message);

			break;

		case SWFUpload.UPLOAD_ERROR.UPLOAD_FAILED:

			progress.setStatus("Upload Failed.");

			this.debug("Error Code: Upload Failed, File name: " + file.name + ", File size: " + file.size + ", Message: " + message);

			break;

		case SWFUpload.UPLOAD_ERROR.IO_ERROR:

			progress.setStatus("Server (IO) Error");

			this.debug("Error Code: IO Error, File name: " + file.name + ", Message: " + message);

			break;

		case SWFUpload.UPLOAD_ERROR.SECURITY_ERROR:

			progress.setStatus("Security Error");

			this.debug("Error Code: Security Error, File name: " + file.name + ", Message: " + message);

			break;

		case SWFUpload.UPLOAD_ERROR.UPLOAD_LIMIT_EXCEEDED:

			progress.setStatus("Upload limit exceeded.");

			this.debug("Error Code: Upload Limit Exceeded, File name: " + file.name + ", File size: " + file.size + ", Message: " + message);

			break;

		case SWFUpload.UPLOAD_ERROR.FILE_VALIDATION_FAILED:

			progress.setStatus("Failed Validation.  Upload skipped.");

			this.debug("Error Code: File Validation Failed, File name: " + file.name + ", File size: " + file.size + ", Message: " + message);

			break;

		case SWFUpload.UPLOAD_ERROR.FILE_CANCELLED:

			// If there aren't any files left (they were all cancelled) disable the cancel button

			if (this.getStats().files_queued === 0) {

				document.getElementById(this.customSettings.cancelButtonId).disabled = true;

			}

			progress.setStatus("Cancelled");

			progress.setCancelled();

			break;

		case SWFUpload.UPLOAD_ERROR.UPLOAD_STOPPED:

			progress.setStatus("Stopped");

			break;

		default:

			progress.setStatus("Unhandled Error: " + errorCode);

			this.debug("Error Code: " + errorCode + ", File name: " + file.name + ", File size: " + file.size + ", Message: " + message);

			break;

		}

	} catch (ex) {

        this.debug(ex);

    }

}



function uploadComplete(file) {

        if (this.getStats().files_queued > 0)

	    this.startUpload();

	if (this.getStats().files_queued === 0) {

		//document.getElementById(this.customSettings.cancelButtonId).disabled = true;

ShowPanel("div_actions");

ShowPanel("div_actionsBtn");

ShowPanel("plusQuickUploadBtn");

ShowPanel("uPrepare");

//QUploadAfterLoadingComplete();

	}

}



// This event comes from the Queue Plugin

function queueComplete(numFilesUploaded) {

	var status = document.getElementById("divStatus");

	status.innerHTML = numFilesUploaded + " file" + (numFilesUploaded === 1 ? "" : "s") + " uploaded.";

}



function removeElement(parentDiv, childDiv){

     if (childDiv == parentDiv) {

          //alert("The parent div cannot be removed.");

     }

     else if (document.getElementById(childDiv)) {     

          var child = document.getElementById(childDiv);

          var parent = document.getElementById(parentDiv);

          parent.removeChild(child);

     }

     else {

          //alert("Child div has already been removed or does not exist.");

          return false;

     }

}



function clearQueueFiles()

{



swfu.cancelQueue();

ClearDiv("sortable");

filesQueued = 0;

document.getElementById("div_totalQueueNum").innerHTML="Total Files: "+filesQueued; 

/*



 var FormArray=ConvertFormElementsToArray("frm_prepare");

//alert(FormArray.length);

if(FormArray.length>1)

{

//alert(222);

              var files=new Array();

	    for (var i=0; i<FormArray.length; i++)

	    {

		var element=FormArray[i];

////alert("el:"+element.parentNode);

             if (element.name=='frm_prepare_cb')

               {

//alert("checked : " + document.getElementById(element.name).checked);

                if(document.getElementById(element.name).checked != true)

                 {

//alert("val:"+element.value);



//var parentID=document.getElementById("qThumb"+element.value).parentNode.id;

////alert("parentID"+parentID);

//removeElement(parentID, "qThumb"+element.value);

                 }

               }

	    }

      //return files;

}

else

*/



{

//document.getElementById("sortable").innerHTML="";

//document.getElementById("thumbnails").style.height="0px";

if(document.getElementById("progressBarStatus"))

document.getElementById("progressBarStatus").innerHTML="";

//HidePanel("div_actionsBtn");

//HidePanel("div_uploadQueue");

//HidePanel("div_plusQuickUploadBtn");

document.getElementById("sortable").innerHTML="";

//document.getElementById("div_quickUploadContent").style.width = "100px";

//document.getElementById("div_uploadQueue").innerHTML="No files yet!";

}

}



function clickHideMoreOptions()

{

	HidePanel('hideMoreOptions');ShowPanel('showMoreOptions');HidePanel('massEditMoreOptions');

	HidePanel('basicinfo');

	HidePanel('camerainfo');

	//HidePanel('massFileInfoOptions');

	ShowPanel('basicinfocontent');HidePanel('camerainfocontent');

}



function clickShowMoreOptions()

{

 ShowPanel('hideMoreOptions');

 HidePanel('showMoreOptions');

 ShowPanel('massEditMoreOptions');

 ShowPanel('basicinfo');

 ShowPanel('camerainfo');

}



function reopenDoubleClick()

{

	if(document.getElementById("div_fileUploader").style.display != "none")

	{

		if(document.getElementById(document.getElementById("gallery_albums_control").parentNode.id).parentNode.id == "")

		queueDoubleClick(document.getElementById("collectedf").value, "queue", "");

	}

}



function queueDoubleClick(FileCode, typ, fileType)

{

//alert("typ:"+typ);

document.getElementById("collectedf").value=FileCode;



if(FileCode=="")

FileCode = collectedfilesFromQueue();



var groupDiv="";

closeDialog('PopDiv');

if(typ == "menu")

{

var divHolder="uPrepareContent";

var thumbImg=""

groupDiv='<div style="height:auto; margin:4px;"><label style="float:right; width:100px; padding-top:4px;">Group files:</label><input id="massGroup" name="massGroup" type="checkbox" value="" /><input id="groupName" name="groupName" type="text" size="25" /></div>';

var cancelBtn='<input name="" value="Cancel" type="button" onclick="HidePanel(\'uPrepareContent\');" class="btn" />'

}

else if(typ == "queue")

{

divHolder="contactArea";

var FileSrc="watch.php?f="+FileCode+"&showSize=thumb";

var VisitFile="http://www.yabdoo.com/gallery/show.php?f="+FileCode;

thumbImg='<div style="width:79px; margin:5px; height:auto; text-align:center; background-color:#fff; border:solid 1px #333; margin-left:235px;"><img width="78" height="70" style="border:solid 1px #666; background-image:none;" src="'+FileSrc+'" alt=""/><br/><a href="'+VisitFile+'" target="_blank" class="blue">View file</a></div>';

cancelBtn='<input name="" value="Cancel" type="button" onclick="closeDialog(\'PopDiv\'); disablePopup();" class="btn" />';

}

else

{

divHolder="PopDiv";

var FileSrc="watch.php?f="+FileCode+"&showSize=thumb";

var VisitFile="http://www.yabdoo.com/gallery/show.php?f="+FileCode;

if(fileType == "2")

{

var FileView='<div id="player" style="width:320px; height:230px; color:#ff0000; font-weight:bold; overflow:visible; position:relative;"><object id="flsmallplayer" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="100%" height="100%"><param name="movie" value="videoplayerW.swf" /><param name="wmode" value="transparent" /><param name="allowFullScreen" value="true" /><param name="flashVars"  value="fileCode='+FileCode+'&fileStream=$fileStream&border=0&color=0x000000&showtitle=0" /><object type="application/x-shockwave-flash" data="videoplayerW.swf" flashVars="fileCode='+FileCode+'&fileStream=$fileStream&border=0&color=0x000000&showtitle=0" width="100%" height="100%"><param name="wmode" value="transparent" /><param name="allowFullScreen" value="true" /></object></object></div>';

}

else

FileView='<img width="320" height="230" style="border:solid 1px #666; background-image:none;" src="'+FileSrc+'" alt=""/>';



thumbImg='<div style="width:330px; margin:5px; height:auto; text-align:center; background-color:#fff; border:solid 1px #333;"><div dir="rtl" id="div_fileLinks" style="margin:10px; text-align:right; display:none;"><select name="fileLinksCombo" style="margin-bottom:3px; font-size:10px;"><option value="gallery">Gallery Link</option><option value="post">Post Link</option></select><br/><input id="fileLinksTexr" type="text" value="'+VisitFile+'" style="width:305px;" /></div><div id="div_previewFile" style="margin-top:15px; display:none;">\''+FileView+'\'</div><a id="link_showFile" target="_blank" class="blue" onclick="HidePanel(\'div_fileLinks\');ShowPanel(\'div_previewFile\');HidePanel(\'link_showFile\');ShowPanel(\'link_hideFile\');">Show file</a><a id="link_hideFile" target="_blank" class="blue" style="display:none;" onclick="HidePanel(\'div_fileLinks\');HidePanel(\'div_previewFile\');HidePanel(\'link_hideFile\');ShowPanel(\'link_showFile\');">Hide file</a> | <a href="'+VisitFile+'" target="_blank" class="blue">Watch in Gallery</a> | <a target="_blank" class="blue" onclick="ShowHidePanel(\'div_fileLinks\');HidePanel(\'div_previewFile\');ShowPanel(\'link_showFile\');HidePanel(\'link_hideFile\');">File links</a></div>';

cancelBtn='<input name="" value="Cancel" type="button" onclick="closeDialog(\'PopDiv\'); disablePopup();" class="btn" />';

}

//<img width="320" height="230" style="border:solid 1px #666; background-image:none;" src="'+FileSrc+'" alt=""/>



var divContent;

//alert(divHolder);



loadFileInfoEditBlock(FileCode, typ, divHolder);





/*

document.getElementById(divHolder).style.display="block";

document.getElementById(divHolder).innerHTML='<div style="margin-top:0px; text-align:center; background-color:#E8E8E9; color:#666; font-weight:bold; font-size:10px; padding:2px; border:solid 1px #666; border-bottom:0px;">File Information</div><div style="background-color:#f3f3f3; font-size:10px; padding:2px; padding-left:5px; padding-right:5px; border:solid 1px #666; text-align:right;">'+thumbImg+'<div id="basicinfo" style="display:none; height:22px; margin:4px; margin-bottom:8px; background-color:#ebebeb; text-indent:5px; width:315px;"><a class="blue" onclick="ShowPanel(\'basicinfocontent\'); HidePanel(\'camerainfocontent\');ShowPanel(\'basicinfocollapse1\');HidePanel(\'basicinfocollapse0\');ShowPanel(\'camerainfocollapse0\');HidePanel(\'camerainfocollapse1\');"><img id="basicinfocollapse1" src="images/form-collapse1.gif" align="absmiddle"><img id="basicinfocollapse0" src="images/form-collapse0.gif" align="absmiddle" style="display:none;">Basic Info</a></div><div dir="rtl" id="basicinfocontent" style="width:330px;"><div style="height:22px; margin:4px;"><label style="float:right; width:100px; padding-top:4px;">Title:</label><input id="massTitle" name="massTitle" type="text" size="25" /></div><div style="height:auto; margin:4px;"><label style="float:right; width:100px; padding-top:4px;">Description:</label><textarea id="massDescription" name="massDescription" cols="24" rows="2"></textarea></div><div style="height:auto; margin:4px;"><label style="float:right; width:100px; padding-top:4px;">Tags:</label><input id="massTags" name="massTags" type="text" size="25" /></div><div id="massEditMoreOptions" style="display:none; margin-bottom:8px;"><div style="height:auto; margin:4px;"><label style="float:right; width:100px; padding-top:4px;"></label><input id="massProtect" name="massProtect" type="checkbox" onclick="if(this.checked==true){ShowPanel(\'massProtectPassword\');}else{HidePanel(\'massProtectPassword\');}" />Protect File<input id="massProtectPassword" name="massProtectPassword" type="password" value="password" size="18" style="display:none;"/></div><div style="height:auto; margin:4px;"><label style="float:right; width:100px; padding-top:4px;"></label><input id="massHide" name="massHide" type="checkbox" />Hide File</div><div style="height:auto; margin:4px;"><label style="float:right; width:100px; padding-top:4px;"></label><input id="massHideComments" name="massHideComments" type="checkbox" />Hide Comments</div></div><div style="height:auto; margin:4px;"><label style="float:right; width:100px; padding-top:4px;"></label><input name="" value="Submit" type="button" onclick="SaveMassFileInfo(\''+FileCode+'\');" class="btn"/>'+cancelBtn+'</div></div><div id="camerainfo" style="display:none; height:22px; margin:4px; margin-bottom:8px; margin-top:8px; background-color:#ebebeb; text-indent:5px; width:315px;"><a class="blue" onclick="HidePanel(\'basicinfocontent\'); ShowPanel(\'camerainfocontent\');ShowPanel(\'basicinfocollapse0\');HidePanel(\'basicinfocollapse1\');ShowPanel(\'camerainfocollapse1\');HidePanel(\'camerainfocollapse0\');"><img id="camerainfocollapse1" src="images/form-collapse1.gif" align="absmiddle" style="display:none;"><img id="camerainfocollapse0" src="images/form-collapse0.gif" align="absmiddle">Camera Info</a></div><div dir="rtl" id="camerainfocontent" style="display:none;width:330px;"><fieldset name="frm_massCameraInfo" id="frm_massCameraInfo"><div style="height:22px; margin:4px;"><label style="float:right; width:125px; padding-top:4px;">Model:</label><input id="cameraName" name="cameraName" type="text" size="20" /></div><div style="height:22px; margin:4px;"><label style="float:right; width:125px; padding-top:4px;">Shutter Speed:</label><input id="shutterSpeed" name="shutterSpeed" type="text" size="20" /></div><div style="height:22px; margin:4px;"><label style="float:right; width:125px; padding-top:4px;">Exposure Program:</label><input id="exposureProgram" name="exposureProgram" type="text" size="20" /></div><div style="height:22px; margin:4px;"><label style="float:right; width:125px; padding-top:4px;">F-Stop:</label><input id="fStop" name="fStop" type="text" size="20" /></div><div style="height:22px; margin:4px;"><label style="float:right; width:125px; padding-top:4px;">Aperture Value:</label><input id="apertureValue" name="apertureValue" type="text" size="20" /></div><div style="height:22px; margin:4px;"><label style="float:right; width:125px; padding-top:4px;">Aperture max Value:</label><input id="apertureMaxValue" name="apertureMaxValue" type="text" size="20" /></div><div style="height:22px; margin:4px;"><label style="float:right; width:125px; padding-top:4px;">ISO Speed Ratings:</label><input id="IsoSpeed" name="IsoSpeed" type="text" size="20" /></div><div style="height:22px; margin:4px;"><label style="float:right; width:125px; padding-top:4px;">Focal Length:</label><input id="focalLength" name="focalLength" type="text" size="20" /></div><div style="height:22px; margin:4px;"><label style="float:right; width:125px; padding-top:4px;">Lens:</label><input id="Lens" name="Lens" type="text" size="20" /></div><div style="height:22px; margin:4px;"><label style="float:right; width:125px; padding-top:4px;">Flash:</label><input id="Flash" name="Flash" type="text" size="20" /></div></fieldset><div style="height:auto; margin:4px;"><label style="float:right; width:125px; padding-top:4px;"></label><input name="" value="Submit" type="button" onclick="SaveMassCameraInfo(\''+FileCode+'\',\'mass\');" class="btn"/>'+cancelBtn+'</div></div><a id="showMoreOptions" class="blue" onclick="clickShowMoreOptions();">Show More Options</a><a id="hideMoreOptions" class="blue" onclick="HidePanel(\'hideMoreOptions\');ShowPanel(\'showMoreOptions\');HidePanel(\'massEditMoreOptions\');HidePanel(\'basicinfo\');HidePanel(\'camerainfo\');" style="display:none;">Hide More Options</a></div>';





 if(typ == "selected")

 {

  openDialogue('PopDiv', 'q_'+FileCode, 'right');

   //popupfunNormal("","");

 //Popup.show(PopDiv, id, "below left",{'constrainToScreen':true});

 }

 else if(typ == "queue")

 {  

  popupfunNormal("400", "80");

 HidePanel("popupContactClose");

 HidePanel("contactHeader");

 HidePanel("contactHeaderUl");

 }

 */

}
