﻿//coded by Özgür ALTAY :: www.ozguraltay.com



function showMap(url, desc, setName, setId) {

	// reset first!
	myFlashLightBoxInjector.reset();

	// loop all images
	myFlashLightBoxInjector.appendElement(url, desc, setName, setId);

	// updateImageList
	myFlashLightBoxInjector.updateImageList();

	// Launch Lightbox
	myFlashLightBoxInjector.start(setName);

}

// reset first!
function _resetLightBox() {
	myFlashLightBoxInjector.reset();
}

//append element in DOM through myFlashLightBoxInjector.appendElement
function appendtoLightBox(v1,v2,v3) {
	myFlashLightBoxInjector.appendElement(v1,v2,v3,"mySetOfImages");	
}

// Launch Lightbox
function startLightBox(s1){	
	myFlashLightBoxInjector.start(s1);
}

// updateImageList
function updateLightBox(){
	myFlashLightBoxInjector.updateImageList();
}

function openPopup(p,winName,w,h){
	if(screen){
        topPos=0;
        leftPos=0;
}
    leftPos= (screen.width-w)/2;
    topPos = (screen.height-h)/2;
    newWin1 = window.open(p,winName,'toolbars=no, resizeable=no,scrollbars=no,left='+leftPos+',top='+topPos+',width='+w+',height='+h);
}
