function ClickUploadList(type, list, scheck, checkSession, homeUrl, uploadDir)
{
	window.open("/modules/uploadfile_list.asp?type="+type+"&list="+list+"&scheck="+scheck+"&checkSession="+checkSession+"&homeUrl="+homeUrl+"&uploadDir="+uploadDir, "popupload", "width=430,height=135");
}

function ClickUpload(type, title, pic, scheck, checkSession, homeUrl, uploadDir)
{
	window.open("/modules/uploadfile.asp?type="+type+"&title="+title+"&pic="+pic+"&scheck="+scheck+"&checkSession="+checkSession+"&homeUrl="+homeUrl+"&uploadDir="+uploadDir, "popupload", "width=435,height=165");
}


function ClickUploadCareer(type, title, pic, scheck, checkSession, homeUrl, uploadDir)
{
	window.open("/modules/uploadfile_career.asp?type="+type+"&title="+title+"&pic="+pic+"&scheck="+scheck+"&checkSession="+checkSession+"&homeUrl="+homeUrl+"&uploadDir="+uploadDir, "popupload", "width=435,height=165");
}

function ClickViewList(itype, path, obj, dir)
{
	if(obj.selectedIndex != -1)
	{
		var item = obj.options[obj.selectedIndex].value;
		if(item.indexOf(" : ") == -1)
		{
			var pic = item;
		}
		else
		{	
			var pic = item.substr(0, item.indexOf(" : "));
		}

		if(itype==1)
		{

			if(item.indexOf(" (") == -1)
			{
				path = "/images/backend/" + dir;
			}
			else
			{
				path = path;
			}
			window.open("/modules/view_picture.asp?pic="+path+"/"+pic, "viewpicture", "resizable=yes,scrollbars=yes,width=300,height=300");
		}
		else if(itype==2)
		{
			if(item.indexOf(" (") == -1)
			{
				path = "/images/backend/" + dir;
			}
			else
			{
				path = path;
			}
			window.open(path+"/"+pic, 'applicationpreview', 'resizable=yes,scrollbars=yes,width=600,height=450');
		}
	}
}


function ClickView(itype, pic)
{
	if(pic!="")
	{
		if(itype==1)
		{
			window.open("/modules/view_picture.asp?pic="+pic, "viewpicture", "resizable=yes,scrollbars=yes,width=300,height=300");
		}
		else if(itype==2)
		{
			window.open(pic, 'applicationpreview', 'resizable=yes,scrollbars=yes,width=600,height=450');
		}
	}
}

function ClickRemovePicList(obj)
{
	if(obj.selectedIndex != -1)
	{
		obj.options[obj.selectedIndex] = null;
	}
}

function GetPicList(objPicList, objStorage)
{
	if(objPicList.options.length != 0)
	{
		var val = "";
		for(i=0;i<objPicList.options.length;i++)
		{
			if(val != "" && i+1 <= objPicList.options.length) val += "-,-";
			val += objPicList.options[i].value;
		}
		objStorage.value = val;
	}
}

function GetPicListNew(objPicList, objStorage)
{
	if(objPicList.options.length != 0)
	{
		var val = "";
		for(i=0;i<objPicList.options.length;i++)
		{
			if(objPicList.options[i].value.indexOf(" (") != -1)
			{
				if(val != "" && i+1 <= objPicList.options.length) val += "-,-";
				val += objPicList.options[i].value;
			}
		}
		objStorage.value = val;
	}
}

function GetPicListOld(objPicList, objStorage)
{
	if(objPicList.options.length != 0)
	{
		var val = "";
		for(i=0;i<objPicList.options.length;i++)
		{
			if(objPicList.options[i].value.indexOf(" (") == -1)
			{
				if(val != "" && i+1 <= objPicList.options.length) val += ",";
				if(objPicList.options[i].value.indexOf(" : ") == -1)
				{
					val += "'" + objPicList.options[i].value + "'";
				}
				else
				{
					val += "'" + objPicList.options[i].value.substr(0, objPicList.options[i].value.indexOf(" : ")) + "'";
				}
			}
		}
		objStorage.value = val;
	}
}

function GetAttList(objAttList, objStorage)
{
	if(objAttList.options.length != 0)
	{
		var val = "";
		for(i=0;i<objAttList.options.length;i++)
		{
			if(val != "" && i+1 <= objAttList.options.length) val += "-,-";
			val += objAttList.options[i].value;
		}
		objStorage.value = val;
	}
}

function GetAttListNew(objAttList, objStorage)
{
	if(objAttList.options.length != 0)
	{
		var val = "";
		for(i=0;i<objAttList.options.length;i++)
		{
			if(objAttList.options[i].value.indexOf(" (") != -1)
			{
				if(val != "" && i+1 <= objAttList.options.length) val += "-,-";
				val += objAttList.options[i].value;
			}
		}
		objStorage.value = val;
	}
}

function GetAttListOld(objAttList, objStorage)
{
	if(objAttList.options.length != 0)
	{
		var val = "";
		for(i=0;i<objAttList.options.length;i++)
		{
			if(objAttList.options[i].value.indexOf(" (") == -1)
			{
				if(val != "" && i+1 <= objAttList.options.length) val += ",";
				if(objAttList.options[i].value.indexOf(" : ") == -1)
				{
					val += "'" + objAttList.options[i].value + "'";
				}
				else
				{
					val += "'" + objAttList.options[i].value.substr(0, objAttList.options[i].value.indexOf(" : ")) + "'";
				}
			}
		}
		objStorage.value = val;
	}
}

